Skip to content

get_scene async

get_scene(
    workspace_id: Id,
    scene_id: Id,
    *,
    config_overrides: Optional[AsyncIoTTwinMakerClientConfig] = None,
) -> GetSceneResponse

Retrieves information about a scene.

Parameters:

  • workspace_id (Id) –

    The ID of the workspace that contains the scene.

  • scene_id (Id) –

    The ID of the scene.

Raises:

Source code in docs_src/capo_iottwinmaker/_services/async_io_t_twin_maker.py
async def get_scene(
    self,
    workspace_id: "capo_iottwinmaker.types.id.Id",
    scene_id: "capo_iottwinmaker.types.id.Id",
    *,
    config_overrides: Optional[AsyncIoTTwinMakerClientConfig] = None,
) -> "capo_iottwinmaker.types.get_scene_response.GetSceneResponse":
    """<p>Retrieves information about a scene.</p>

    Args:
        workspace_id: <p>The ID of the workspace that contains the scene.</p>
        scene_id: <p>The ID of the scene.</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.get_scene_request.GetSceneRequest]",
    ) -> AsyncOperationResponse[
        "capo_iottwinmaker.types.get_scene_response.GetSceneResponse"
    ]:
        import capo_iottwinmaker._operations.aws_io_t_twin_maker.get_scene

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetScene")
    )
    input_: capo_iottwinmaker.types.get_scene_request.GetSceneRequest = {
        "workspace_id": workspace_id,
        "scene_id": scene_id,
    }

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