Modify the default properties used to create WorkSpaces.
Parameters:
Raises:
Source code in docs_src/capo_workspaces/_services/async_work_spaces.py
| async def modify_workspace_creation_properties(
self,
resource_id: "capo_workspaces.types.directory_id.DirectoryId",
workspace_creation_properties: "capo_workspaces.types.workspace_creation_properties.WorkspaceCreationProperties",
*,
config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
) -> "capo_workspaces.types.modify_workspace_creation_properties_result.ModifyWorkspaceCreationPropertiesResult":
"""<p>Modify the default properties used to create WorkSpaces.</p>
Args:
resource_id: <p>The identifier of the directory.</p>
workspace_creation_properties: <p>The default properties for creating WorkSpaces.</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_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.modify_workspace_creation_properties_request.ModifyWorkspaceCreationPropertiesRequest]",
) -> AsyncOperationResponse[
"capo_workspaces.types.modify_workspace_creation_properties_result.ModifyWorkspaceCreationPropertiesResult"
]:
import capo_workspaces._operations.workspaces_service.modify_workspace_creation_properties
(
output,
http_response,
) = await capo_workspaces._operations.workspaces_service.modify_workspace_creation_properties.async_modify_workspace_creation_properties(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ModifyWorkspaceCreationProperties")
)
input_: capo_workspaces.types.modify_workspace_creation_properties_request.ModifyWorkspaceCreationPropertiesRequest = {
"resource_id": resource_id,
"workspace_creation_properties": workspace_creation_properties,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|