Skip to content

list_components async

list_components(
    workspace_id: Id,
    entity_id: EntityId,
    *,
    config_overrides: Optional[AsyncIoTTwinMakerClientConfig] = None,
    component_path: Optional[ComponentPath] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListComponentsResponse

This API lists the components of an entity.

Parameters:

  • workspace_id (Id) –

    The workspace ID.

  • entity_id (EntityId) –

    The ID for the entity whose metadata (component/properties) is returned by the operation.

  • component_path (Optional[ComponentPath], default: None ) –

    This string specifies the path to the composite component, starting from the top-level component.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of results returned at one time. The default is 25.

  • next_token (Optional[NextToken], default: None ) –

    The string that specifies the next page of results.

Raises:

Source code in docs_src/capo_iottwinmaker/_services/async_io_t_twin_maker.py
async def list_components(
    self,
    workspace_id: "capo_iottwinmaker.types.id.Id",
    entity_id: "capo_iottwinmaker.types.entity_id.EntityId",
    *,
    config_overrides: Optional[AsyncIoTTwinMakerClientConfig] = None,
    component_path: Optional[
        "capo_iottwinmaker.types.component_path.ComponentPath"
    ] = None,
    max_results: Optional["capo_iottwinmaker.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_iottwinmaker.types.next_token.NextToken"] = None,
) -> "capo_iottwinmaker.types.list_components_response.ListComponentsResponse":
    """<p>This API lists the components of an entity.</p>

    Args:
        workspace_id: <p>The workspace ID.</p>
        entity_id: <p>The ID for the entity whose metadata (component/properties) is returned by the operation.</p>
        component_path: <p>This string specifies the path to the composite component, starting from the top-level component.</p>
        max_results: <p>The maximum number of results returned at one time. The default is 25.</p>
        next_token: <p>The string that specifies the next page of results.</p>

    Raises:
        capo_iottwinmaker.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p>
        capo_iottwinmaker.errors.internal_server_exception.InternalServerException: <p>An unexpected error has occurred.</p>
        capo_iottwinmaker.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource wasn't found.</p>
        capo_iottwinmaker.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iottwinmaker.errors.validation_exception.ValidationException: <p>Failed</p>
        capo_iottwinmaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iottwinmaker.types.list_components_request.ListComponentsRequest]",
    ) -> AsyncOperationResponse[
        "capo_iottwinmaker.types.list_components_response.ListComponentsResponse"
    ]:
        import capo_iottwinmaker._operations.aws_io_t_twin_maker.list_components

        (
            output,
            http_response,
        ) = await capo_iottwinmaker._operations.aws_io_t_twin_maker.list_components.async_list_components(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListComponents")
    )
    input_: capo_iottwinmaker.types.list_components_request.ListComponentsRequest = {
        "workspace_id": workspace_id,
        "entity_id": entity_id,
    }
    if component_path is not None:
        input_["component_path"] = component_path
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output