Skip to content

list_managed_things async

list_managed_things(
    *,
    config_overrides: Optional[AsyncIoTManagedIntegrationsClientConfig] = None,
    owner_filter: Optional[Owner] = None,
    credential_locker_filter: Optional[CredentialLockerId] = None,
    role_filter: Optional[Role] = None,
    parent_controller_identifier_filter: Optional[ParentControllerId] = None,
    connector_policy_id_filter: Optional[ConnectorPolicyId] = None,
    connector_destination_id_filter: Optional[ConnectorDestinationId] = None,
    connector_device_id_filter: Optional[ConnectorDeviceId] = None,
    serial_number_filter: Optional[SerialNumber] = None,
    provisioning_status_filter: Optional[ProvisioningStatus] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListManagedThingsResponse

Listing all managed things with provision for filters.

Parameters:

  • owner_filter (Optional[Owner], default: None ) –

    Filter on device owners when listing managed things.

  • credential_locker_filter (Optional[CredentialLockerId], default: None ) –

    Filter on a credential locker for a managed thing.

  • role_filter (Optional[Role], default: None ) –

    Filter on the type of device used. This will be the Amazon Web Services hub controller, cloud device, or IoT device.

  • parent_controller_identifier_filter (Optional[ParentControllerId], default: None ) –

    Filter on a parent controller id for a managed thing.

  • connector_policy_id_filter (Optional[ConnectorPolicyId], default: None ) –

    Filter on a connector policy id for a managed thing.

  • connector_destination_id_filter (Optional[ConnectorDestinationId], default: None ) –

    Filter managed things by the connector destination ID they are associated with.

  • connector_device_id_filter (Optional[ConnectorDeviceId], default: None ) –

    Filter managed things by the connector device ID they are associated with. When specified, only managed things with this connector device ID will be returned.

  • serial_number_filter (Optional[SerialNumber], default: None ) –

    Filter on the serial number of the device.

  • provisioning_status_filter (Optional[ProvisioningStatus], default: None ) –

    Filter on the status of the device. For more information, see Device Provisioning.

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

    A token that can be used to retrieve the next set of results.

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

    The maximum number of results to return at one time.

Raises:

Source code in docs_src/capo_iot_managed_integrations/_services/async_io_t_managed_integrations.py
async def list_managed_things(
    self,
    *,
    config_overrides: Optional[AsyncIoTManagedIntegrationsClientConfig] = None,
    owner_filter: Optional[
        "capo_iot_managed_integrations.types.owner.Owner"
    ] = None,
    credential_locker_filter: Optional[
        "capo_iot_managed_integrations.types.credential_locker_id.CredentialLockerId"
    ] = None,
    role_filter: Optional["capo_iot_managed_integrations.types.role.Role"] = None,
    parent_controller_identifier_filter: Optional[
        "capo_iot_managed_integrations.types.parent_controller_id.ParentControllerId"
    ] = None,
    connector_policy_id_filter: Optional[
        "capo_iot_managed_integrations.types.connector_policy_id.ConnectorPolicyId"
    ] = None,
    connector_destination_id_filter: Optional[
        "capo_iot_managed_integrations.types.connector_destination_id.ConnectorDestinationId"
    ] = None,
    connector_device_id_filter: Optional[
        "capo_iot_managed_integrations.types.connector_device_id.ConnectorDeviceId"
    ] = None,
    serial_number_filter: Optional[
        "capo_iot_managed_integrations.types.serial_number.SerialNumber"
    ] = None,
    provisioning_status_filter: Optional[
        "capo_iot_managed_integrations.types.provisioning_status.ProvisioningStatus"
    ] = None,
    next_token: Optional[
        "capo_iot_managed_integrations.types.next_token.NextToken"
    ] = None,
    max_results: Optional[
        "capo_iot_managed_integrations.types.max_results.MaxResults"
    ] = None,
) -> "capo_iot_managed_integrations.types.list_managed_things_response.ListManagedThingsResponse":
    """<p>Listing all managed things with provision for filters.</p>

    Args:
        owner_filter: <p>Filter on device owners when listing managed things.</p>
        credential_locker_filter: <p>Filter on a credential locker for a managed thing.</p>
        role_filter: <p>Filter on the type of device used. This will be the Amazon Web Services hub controller, cloud device, or IoT device.</p>
        parent_controller_identifier_filter: <p>Filter on a parent controller id for a managed thing.</p>
        connector_policy_id_filter: <p>Filter on a connector policy id for a managed thing.</p>
        connector_destination_id_filter: <p>Filter managed things by the connector destination ID they are associated with.</p>
        connector_device_id_filter: <p>Filter managed things by the connector device ID they are associated with. When specified, only managed things with this connector device ID will be returned.</p>
        serial_number_filter: <p>Filter on the serial number of the device.</p>
        provisioning_status_filter: <p>Filter on the status of the device. For more information, see <a href="https://docs.aws.amazon.com/iot-mi/latest/devguide/device-provisioning.html">Device Provisioning</a>.</p>
        next_token: <p>A token that can be used to retrieve the next set of results.</p>
        max_results: <p>The maximum number of results to return at one time.</p>

    Raises:
        capo_iot_managed_integrations.errors.access_denied_exception.AccessDeniedException: <p>User is not authorized.</p>
        capo_iot_managed_integrations.errors.internal_server_exception.InternalServerException: <p>Internal error from the service that indicates an unexpected error or that the service is unavailable.</p>
        capo_iot_managed_integrations.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is temporarily unavailable.</p>
        capo_iot_managed_integrations.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iot_managed_integrations.errors.unauthorized_exception.UnauthorizedException: <p>You are not authorized to perform this operation.</p>
        capo_iot_managed_integrations.errors.validation_exception.ValidationException: <p>A validation error occurred when performing the API request.</p>
        capo_iot_managed_integrations.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iot_managed_integrations.types.list_managed_things_request.ListManagedThingsRequest]",
    ) -> AsyncOperationResponse[
        "capo_iot_managed_integrations.types.list_managed_things_response.ListManagedThingsResponse"
    ]:
        import capo_iot_managed_integrations._operations.iot_managed_integrations.list_managed_things

        (
            output,
            http_response,
        ) = await capo_iot_managed_integrations._operations.iot_managed_integrations.list_managed_things.async_list_managed_things(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_iot_managed_integrations.types.list_managed_things_request.ListManagedThingsRequest",
    ) -> dict[str, Any]:
        import capo_iot_managed_integrations.types.list_managed_things_request

        return capo_iot_managed_integrations.types.list_managed_things_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_iot_managed_integrations.types.list_managed_things_response.ListManagedThingsResponse",
    ) -> dict[str, Any]:
        import capo_iot_managed_integrations.types.list_managed_things_response

        return capo_iot_managed_integrations.types.list_managed_things_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "ListManagedThings",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_iot_managed_integrations.types.list_managed_things_request.ListManagedThingsRequest = {}
    if owner_filter is not None:
        input_["owner_filter"] = owner_filter
    if credential_locker_filter is not None:
        input_["credential_locker_filter"] = credential_locker_filter
    if role_filter is not None:
        input_["role_filter"] = role_filter
    if parent_controller_identifier_filter is not None:
        input_["parent_controller_identifier_filter"] = (
            parent_controller_identifier_filter
        )
    if connector_policy_id_filter is not None:
        input_["connector_policy_id_filter"] = connector_policy_id_filter
    if connector_destination_id_filter is not None:
        input_["connector_destination_id_filter"] = connector_destination_id_filter
    if connector_device_id_filter is not None:
        input_["connector_device_id_filter"] = connector_device_id_filter
    if serial_number_filter is not None:
        input_["serial_number_filter"] = serial_number_filter
    if provisioning_status_filter is not None:
        input_["provisioning_status_filter"] = provisioning_status_filter
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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