Creates one or more WorkSpaces.
This operation is asynchronous and returns before the WorkSpaces are created.
-
The MANUAL running mode value is only supported by Amazon WorkSpaces Core. Contact your account team to be allow-listed to use this value. For more information, see Amazon WorkSpaces Core.
-
You don't need to specify the PCOIP protocol for Linux bundles because DCV (formerly WSP) is the default protocol for those bundles.
-
User-decoupled WorkSpaces are only supported by Amazon WorkSpaces Core.
-
Review your running mode to ensure you are using one that is optimal for your needs and budget. For more information on switching running modes, see Can I switch between hourly and monthly billing?
Parameters:
Raises:
Source code in docs_src/capo_workspaces/_services/work_spaces.py
| def create_workspaces(
self,
workspaces: "capo_workspaces.types.workspace_request_list.WorkspaceRequestList",
*,
config_overrides: Optional[WorkSpacesClientConfig] = None,
) -> "capo_workspaces.types.create_workspaces_result.CreateWorkspacesResult":
"""<p>Creates one or more WorkSpaces.</p> <p>This operation is asynchronous and returns before the WorkSpaces are created.</p> <note> <ul> <li> <p>The <code>MANUAL</code> running mode value is only supported by Amazon WorkSpaces Core. Contact your account team to be allow-listed to use this value. For more information, see <a href="http://aws.amazon.com/workspaces/core/">Amazon WorkSpaces Core</a>.</p> </li> <li> <p>You don't need to specify the <code>PCOIP</code> protocol for Linux bundles because <code>DCV</code> (formerly WSP) is the default protocol for those bundles.</p> </li> <li> <p>User-decoupled WorkSpaces are only supported by Amazon WorkSpaces Core.</p> </li> <li> <p>Review your running mode to ensure you are using one that is optimal for your needs and budget. For more information on switching running modes, see <a href="http://aws.amazon.com/workspaces-family/workspaces/faqs/#:~:text=Can%20I%20switch%20between%20hourly%20and%20monthly%20billing%20on%20WorkSpaces%20Personal%3F"> Can I switch between hourly and monthly billing?</a> </p> </li> </ul> </note>
Args:
workspaces: <p>The WorkSpaces to create. You can specify up to 25 WorkSpaces.</p>
Raises:
capo_workspaces.errors.invalid_parameter_values_exception.InvalidParameterValuesException: <p>One or more parameter values are not valid.</p>
capo_workspaces.errors.resource_limit_exceeded_exception.ResourceLimitExceededException: <p>Your resource limits have been exceeded.</p>
capo_workspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_workspaces.types.create_workspaces_request.CreateWorkspacesRequest]",
) -> OperationResponse[
"capo_workspaces.types.create_workspaces_result.CreateWorkspacesResult"
]:
import capo_workspaces._operations.workspaces_service.create_workspaces
output, http_response = (
capo_workspaces._operations.workspaces_service.create_workspaces.create_workspaces(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateWorkspaces")
)
input_: capo_workspaces.types.create_workspaces_request.CreateWorkspacesRequest = {
"workspaces": workspaces
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|