Lists all scenes in a workspace.
Parameters:
-
workspace_id
(Id)
–
The ID of the workspace that contains the scenes.
-
max_results
(Optional[MaxResults], default:
None
)
–
Specifies the maximum number of results to display.
-
next_token
(Optional[NextToken], default:
None
)
–
The string that specifies the next page of results.
Raises:
Source code in docs_src/capo_iottwinmaker/_services/io_t_twin_maker.py
| def list_scenes(
self,
workspace_id: "capo_iottwinmaker.types.id.Id",
*,
config_overrides: Optional[IoTTwinMakerClientConfig] = None,
max_results: Optional["capo_iottwinmaker.types.max_results.MaxResults"] = None,
next_token: Optional["capo_iottwinmaker.types.next_token.NextToken"] = None,
) -> "capo_iottwinmaker.types.list_scenes_response.ListScenesResponse":
"""<p>Lists all scenes in a workspace.</p>
Args:
workspace_id: <p>The ID of the workspace that contains the scenes.</p>
max_results: <p>Specifies the maximum number of results to display.</p>
next_token: <p>The string that specifies the next page of results.</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.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.
"""
def _handler(
req: "OperationRequest[capo_iottwinmaker.types.list_scenes_request.ListScenesRequest]",
) -> OperationResponse[
"capo_iottwinmaker.types.list_scenes_response.ListScenesResponse"
]:
import capo_iottwinmaker._operations.aws_io_t_twin_maker.list_scenes
output, http_response = (
capo_iottwinmaker._operations.aws_io_t_twin_maker.list_scenes.list_scenes(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListScenes")
)
input_: capo_iottwinmaker.types.list_scenes_request.ListScenesRequest = {
"workspace_id": workspace_id
}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|