Skip to content

list_named_shadows_for_thing

list_named_shadows_for_thing(
    thing_name: ThingName,
    *,
    config_overrides: Optional[IoTDataPlaneClientConfig] = None,
    next_token: Optional[NextToken] = None,
    page_size: Optional[PageSize] = None,
) -> ListNamedShadowsForThingResponse

Lists the shadows for the specified thing.

Requires permission to access the ListNamedShadowsForThing action.

Parameters:

  • thing_name (ThingName) –

    The name of the thing.

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

    The token to retrieve the next set of results.

  • page_size (Optional[PageSize], default: None ) –

    The result page size.

Raises:

Source code in docs_src/capo_iot_data_plane/_services/io_t_data_plane.py
def list_named_shadows_for_thing(
    self,
    thing_name: "capo_iot_data_plane.types.thing_name.ThingName",
    *,
    config_overrides: Optional[IoTDataPlaneClientConfig] = None,
    next_token: Optional["capo_iot_data_plane.types.next_token.NextToken"] = None,
    page_size: Optional["capo_iot_data_plane.types.page_size.PageSize"] = None,
) -> "capo_iot_data_plane.types.list_named_shadows_for_thing_response.ListNamedShadowsForThingResponse":
    """<p>Lists the shadows for the specified thing.</p> <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">ListNamedShadowsForThing</a> action.</p>

    Args:
        thing_name: <p>The name of the thing.</p>
        next_token: <p>The token to retrieve the next set of results.</p>
        page_size: <p>The result page size.</p>

    Raises:
        capo_iot_data_plane.errors.internal_failure_exception.InternalFailureException: <p>An unexpected error has occurred.</p>
        capo_iot_data_plane.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_iot_data_plane.errors.method_not_allowed_exception.MethodNotAllowedException: <p>The specified combination of HTTP verb and URI is not supported.</p>
        capo_iot_data_plane.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_iot_data_plane.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is temporarily unavailable.</p>
        capo_iot_data_plane.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iot_data_plane.errors.unauthorized_exception.UnauthorizedException: <p>You are not authorized to perform this operation.</p>
        capo_iot_data_plane.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_iot_data_plane.types.list_named_shadows_for_thing_request.ListNamedShadowsForThingRequest]",
    ) -> OperationResponse[
        "capo_iot_data_plane.types.list_named_shadows_for_thing_response.ListNamedShadowsForThingResponse"
    ]:
        import capo_iot_data_plane._operations.iot_moonraker_service.list_named_shadows_for_thing

        output, http_response = (
            capo_iot_data_plane._operations.iot_moonraker_service.list_named_shadows_for_thing.list_named_shadows_for_thing(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListNamedShadowsForThing")
    )
    input_: capo_iot_data_plane.types.list_named_shadows_for_thing_request.ListNamedShadowsForThingRequest = {
        "thing_name": thing_name
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if page_size is not None:
        input_["page_size"] = page_size

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output