Skip to content

update_scene async

update_scene(
    workspace_id: Id,
    scene_id: Id,
    *,
    config_overrides: Optional[AsyncIoTTwinMakerClientConfig] = None,
    content_location: Optional[S3Url] = None,
    description: Optional[Description] = None,
    capabilities: Optional[SceneCapabilities] = None,
    scene_metadata: Optional[SceneMetadataMap] = None,
) -> UpdateSceneResponse

Updates a scene.

Parameters:

  • workspace_id (Id) –

    The ID of the workspace that contains the scene.

  • scene_id (Id) –

    The ID of the scene.

  • content_location (Optional[S3Url], default: None ) –

    The relative path that specifies the location of the content definition file.

  • description (Optional[Description], default: None ) –

    The description of this scene.

  • capabilities (Optional[SceneCapabilities], default: None ) –

    A list of capabilities that the scene uses to render.

  • scene_metadata (Optional[SceneMetadataMap], default: None ) –

    The scene metadata.

Raises:

Source code in docs_src/capo_iottwinmaker/_services/async_io_t_twin_maker.py
async def update_scene(
    self,
    workspace_id: "capo_iottwinmaker.types.id.Id",
    scene_id: "capo_iottwinmaker.types.id.Id",
    *,
    config_overrides: Optional[AsyncIoTTwinMakerClientConfig] = None,
    content_location: Optional["capo_iottwinmaker.types.s3_url.S3Url"] = None,
    description: Optional["capo_iottwinmaker.types.description.Description"] = None,
    capabilities: Optional[
        "capo_iottwinmaker.types.scene_capabilities.SceneCapabilities"
    ] = None,
    scene_metadata: Optional[
        "capo_iottwinmaker.types.scene_metadata_map.SceneMetadataMap"
    ] = None,
) -> "capo_iottwinmaker.types.update_scene_response.UpdateSceneResponse":
    """<p>Updates 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>
        content_location: <p>The relative path that specifies the location of the content definition file.</p>
        description: <p>The description of this scene.</p>
        capabilities: <p>A list of capabilities that the scene uses to render.</p>
        scene_metadata: <p>The scene metadata.</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.update_scene_request.UpdateSceneRequest]",
    ) -> AsyncOperationResponse[
        "capo_iottwinmaker.types.update_scene_response.UpdateSceneResponse"
    ]:
        import capo_iottwinmaker._operations.aws_io_t_twin_maker.update_scene

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateScene")
    )
    input_: capo_iottwinmaker.types.update_scene_request.UpdateSceneRequest = {
        "workspace_id": workspace_id,
        "scene_id": scene_id,
    }
    if content_location is not None:
        input_["content_location"] = content_location
    if description is not None:
        input_["description"] = description
    if capabilities is not None:
        input_["capabilities"] = capabilities
    if scene_metadata is not None:
        input_["scene_metadata"] = scene_metadata

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