Skip to content

get_workspace

get_workspace(
    workspace_id: IdOrArn,
    *,
    config_overrides: Optional[IoTTwinMakerClientConfig] = None,
) -> GetWorkspaceResponse

Retrieves information about a workspace.

Parameters:

  • workspace_id (IdOrArn) –

    The ID of the workspace.

Raises:

Source code in docs_src/capo_iottwinmaker/_services/io_t_twin_maker.py
def get_workspace(
    self,
    workspace_id: "capo_iottwinmaker.types.id_or_arn.IdOrArn",
    *,
    config_overrides: Optional[IoTTwinMakerClientConfig] = None,
) -> "capo_iottwinmaker.types.get_workspace_response.GetWorkspaceResponse":
    """<p>Retrieves information about a workspace.</p>

    Args:
        workspace_id: <p>The ID of the workspace.</p>

    Raises:
        capo_iottwinmaker.errors.internal_server_exception.InternalServerException: <p>An unexpected error has occurred.</p>
        capo_iottwinmaker.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource wasn't found.</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.get_workspace_request.GetWorkspaceRequest]",
    ) -> OperationResponse[
        "capo_iottwinmaker.types.get_workspace_response.GetWorkspaceResponse"
    ]:
        import capo_iottwinmaker._operations.aws_io_t_twin_maker.get_workspace

        output, http_response = (
            capo_iottwinmaker._operations.aws_io_t_twin_maker.get_workspace.get_workspace(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetWorkspace")
    )
    input_: capo_iottwinmaker.types.get_workspace_request.GetWorkspaceRequest = {
        "workspace_id": workspace_id
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output