Retrieves information about workspaces in the current account.
Parameters:
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of results to return at one time. The default is 25.
Valid Range: Minimum value of 1. Maximum value of 250.
-
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_workspaces(
self,
*,
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_workspaces_response.ListWorkspacesResponse":
"""<p>Retrieves information about workspaces in the current account.</p>
Args:
max_results: <p>The maximum number of results to return at one time. The default is 25.</p> <p>Valid Range: Minimum value of 1. Maximum value of 250.</p>
next_token: <p>The string that specifies the next page of results.</p>
Raises:
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.
"""
def _handler(
req: "OperationRequest[capo_iottwinmaker.types.list_workspaces_request.ListWorkspacesRequest]",
) -> OperationResponse[
"capo_iottwinmaker.types.list_workspaces_response.ListWorkspacesResponse"
]:
import capo_iottwinmaker._operations.aws_io_t_twin_maker.list_workspaces
output, http_response = (
capo_iottwinmaker._operations.aws_io_t_twin_maker.list_workspaces.list_workspaces(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListWorkspaces")
)
input_: capo_iottwinmaker.types.list_workspaces_request.ListWorkspacesRequest = {}
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
|