updateScene method

Future<UpdateSceneResponse> updateScene({
  1. required String sceneId,
  2. required String workspaceId,
  3. List<String>? capabilities,
  4. String? contentLocation,
  5. String? description,
  6. Map<String, String>? sceneMetadata,
})

Updates a scene.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter sceneId : The ID of the scene.

Parameter workspaceId : The ID of the workspace that contains the scene.

Parameter capabilities : A list of capabilities that the scene uses to render.

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

Parameter description : The description of this scene.

Parameter sceneMetadata : The scene metadata.

Implementation

Future<UpdateSceneResponse> updateScene({
  required String sceneId,
  required String workspaceId,
  List<String>? capabilities,
  String? contentLocation,
  String? description,
  Map<String, String>? sceneMetadata,
}) async {
  final $payload = <String, dynamic>{
    if (capabilities != null) 'capabilities': capabilities,
    if (contentLocation != null) 'contentLocation': contentLocation,
    if (description != null) 'description': description,
    if (sceneMetadata != null) 'sceneMetadata': sceneMetadata,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/workspaces/${Uri.encodeComponent(workspaceId)}/scenes/${Uri.encodeComponent(sceneId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateSceneResponse.fromJson(response);
}