createScene method
Creates a scene.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter contentLocation :
The relative path that specifies the location of the content definition
file.
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 itself.
Parameter description :
The description for this scene.
Parameter sceneMetadata :
The request metadata.
Parameter tags :
Metadata that you can use to manage the scene.
Implementation
Future<CreateSceneResponse> createScene({
required String contentLocation,
required String sceneId,
required String workspaceId,
List<String>? capabilities,
String? description,
Map<String, String>? sceneMetadata,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'contentLocation': contentLocation,
'sceneId': sceneId,
if (capabilities != null) 'capabilities': capabilities,
if (description != null) 'description': description,
if (sceneMetadata != null) 'sceneMetadata': sceneMetadata,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/workspaces/${Uri.encodeComponent(workspaceId)}/scenes',
exceptionFnMap: _exceptionFns,
);
return CreateSceneResponse.fromJson(response);
}