Skip to content

create_scene async

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

Creates 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 (S3Url) –

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

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

    The description for this scene.

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

    A list of capabilities that the scene uses to render itself.

  • tags (Optional[TagMap], default: None ) –

    Metadata that you can use to manage the scene.

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

    The request metadata.

Raises:

Source code in docs_src/capo_iottwinmaker/_services/async_io_t_twin_maker.py
async def create_scene(
    self,
    workspace_id: "capo_iottwinmaker.types.id.Id",
    scene_id: "capo_iottwinmaker.types.id.Id",
    content_location: "capo_iottwinmaker.types.s3_url.S3Url",
    *,
    config_overrides: Optional[AsyncIoTTwinMakerClientConfig] = None,
    description: Optional["capo_iottwinmaker.types.description.Description"] = None,
    capabilities: Optional[
        "capo_iottwinmaker.types.scene_capabilities.SceneCapabilities"
    ] = None,
    tags: Optional["capo_iottwinmaker.types.tag_map.TagMap"] = None,
    scene_metadata: Optional[
        "capo_iottwinmaker.types.scene_metadata_map.SceneMetadataMap"
    ] = None,
) -> "capo_iottwinmaker.types.create_scene_response.CreateSceneResponse":
    """<p>Creates 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 for this scene.</p>
        capabilities: <p>A list of capabilities that the scene uses to render itself.</p>
        tags: <p>Metadata that you can use to manage the scene.</p>
        scene_metadata: <p>The request metadata.</p>

    Raises:
        capo_iottwinmaker.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p>
        capo_iottwinmaker.errors.conflict_exception.ConflictException: <p>A conflict occurred.</p>
        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.create_scene_request.CreateSceneRequest]",
    ) -> AsyncOperationResponse[
        "capo_iottwinmaker.types.create_scene_response.CreateSceneResponse"
    ]:
        import capo_iottwinmaker._operations.aws_io_t_twin_maker.create_scene

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateScene")
    )
    input_: capo_iottwinmaker.types.create_scene_request.CreateSceneRequest = {
        "workspace_id": workspace_id,
        "scene_id": scene_id,
        "content_location": content_location,
    }
    if description is not None:
        input_["description"] = description
    if capabilities is not None:
        input_["capabilities"] = capabilities
    if tags is not None:
        input_["tags"] = tags
    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