Creates a standby WorkSpace in a secondary Region.
Parameters:
-
primary_region
(Region)
–
The Region of the primary WorkSpace.
-
standby_workspaces
(StandbyWorkspacesList)
–
Information about the standby WorkSpace to be created.
Raises:
Source code in docs_src/capo_workspaces/_services/async_work_spaces.py
| async def create_standby_workspaces(
self,
primary_region: "capo_workspaces.types.region.Region",
standby_workspaces: "capo_workspaces.types.standby_workspaces_list.StandbyWorkspacesList",
*,
config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
) -> "capo_workspaces.types.create_standby_workspaces_result.CreateStandbyWorkspacesResult":
"""<p>Creates a standby WorkSpace in a secondary Region.</p>
Args:
primary_region: <p>The Region of the primary WorkSpace.</p>
standby_workspaces: <p>Information about the standby WorkSpace to be created.</p>
Raises:
capo_workspaces.errors.access_denied_exception.AccessDeniedException: <p>The user is not authorized to access a resource.</p>
capo_workspaces.errors.invalid_parameter_values_exception.InvalidParameterValuesException: <p>One or more parameter values are not valid.</p>
capo_workspaces.errors.operation_not_supported_exception.OperationNotSupportedException: <p>This operation is not supported.</p>
capo_workspaces.errors.resource_limit_exceeded_exception.ResourceLimitExceededException: <p>Your resource limits have been exceeded.</p>
capo_workspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
capo_workspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_workspaces.types.create_standby_workspaces_request.CreateStandbyWorkspacesRequest]",
) -> AsyncOperationResponse[
"capo_workspaces.types.create_standby_workspaces_result.CreateStandbyWorkspacesResult"
]:
import capo_workspaces._operations.workspaces_service.create_standby_workspaces
(
output,
http_response,
) = await capo_workspaces._operations.workspaces_service.create_standby_workspaces.async_create_standby_workspaces(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateStandbyWorkspaces")
)
input_: capo_workspaces.types.create_standby_workspaces_request.CreateStandbyWorkspacesRequest = {
"primary_region": primary_region,
"standby_workspaces": standby_workspaces,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|