Skip to content

list_entities async

list_entities(
    workspace_id: Id,
    *,
    config_overrides: Optional[AsyncIoTTwinMakerClientConfig] = None,
    filters: Optional[ListEntitiesFilters] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListEntitiesResponse

Lists all entities in a workspace.

Parameters:

  • workspace_id (Id) –

    The ID of the workspace.

  • filters (Optional[ListEntitiesFilters], default: None ) –

    A list of objects that filter the request.

    Only one object is accepted as a valid input.

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

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

    Valid Range: Minimum value of 1. Maximum value of 250.

  • 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_entities(
    self,
    workspace_id: "capo_iottwinmaker.types.id.Id",
    *,
    config_overrides: Optional[AsyncIoTTwinMakerClientConfig] = None,
    filters: Optional[
        "capo_iottwinmaker.types.list_entities_filters.ListEntitiesFilters"
    ] = 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_entities_response.ListEntitiesResponse":
    """<p>Lists all entities in a workspace.</p>

    Args:
        workspace_id: <p>The ID of the workspace.</p>
        filters: <p>A list of objects that filter the request.</p> <note> <p>Only one object is accepted as a valid input.</p> </note>
        max_results: <p>The maximum number of results to return at one time. The default is 25.</p> <p>Valid Range: Minimum value of 1. Maximum value of 250.</p>
        next_token: <p>The string that specifies the next page of results.</p>

    Raises:
        capo_iottwinmaker.errors.internal_server_exception.InternalServerException: <p>An unexpected error has occurred.</p>
        capo_iottwinmaker.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The service quota was exceeded.</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_entities_request.ListEntitiesRequest]",
    ) -> AsyncOperationResponse[
        "capo_iottwinmaker.types.list_entities_response.ListEntitiesResponse"
    ]:
        import capo_iottwinmaker._operations.aws_io_t_twin_maker.list_entities

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListEntities")
    )
    input_: capo_iottwinmaker.types.list_entities_request.ListEntitiesRequest = {
        "workspace_id": workspace_id
    }
    if filters is not None:
        input_["filters"] = filters
    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