Associates the specified application to the specified WorkSpace.
Parameters:
Raises:
Source code in docs_src/capo_workspaces/_services/async_work_spaces.py
| async def associate_workspace_application(
self,
workspace_id: "capo_workspaces.types.workspace_id.WorkspaceId",
application_id: "capo_workspaces.types.work_space_application_id.WorkSpaceApplicationId",
*,
config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
) -> "capo_workspaces.types.associate_workspace_application_result.AssociateWorkspaceApplicationResult":
"""<p>Associates the specified application to the specified WorkSpace.</p>
Args:
workspace_id: <p>The identifier of the WorkSpace.</p>
application_id: <p>The identifier of the application.</p>
Raises:
capo_workspaces.errors.access_denied_exception.AccessDeniedException: <p>The user is not authorized to access a resource.</p>
capo_workspaces.errors.application_not_supported_exception.ApplicationNotSupportedException: <p>The specified application is not supported.</p>
capo_workspaces.errors.compute_not_compatible_exception.ComputeNotCompatibleException: <p>The compute type of the WorkSpace is not compatible with the application.</p>
capo_workspaces.errors.incompatible_applications_exception.IncompatibleApplicationsException: <p>The specified application is not compatible with the resource.</p>
capo_workspaces.errors.invalid_parameter_values_exception.InvalidParameterValuesException: <p>One or more parameter values are not valid.</p>
capo_workspaces.errors.operating_system_not_compatible_exception.OperatingSystemNotCompatibleException: <p>The operating system of the WorkSpace is not compatible with the application.</p>
capo_workspaces.errors.operation_not_supported_exception.OperationNotSupportedException: <p>This operation is not supported.</p>
capo_workspaces.errors.resource_already_exists_exception.ResourceAlreadyExistsException: <p>The specified resource already exists.</p>
capo_workspaces.errors.resource_in_use_exception.ResourceInUseException: <p>The specified resource is currently in use.</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.associate_workspace_application_request.AssociateWorkspaceApplicationRequest]",
) -> AsyncOperationResponse[
"capo_workspaces.types.associate_workspace_application_result.AssociateWorkspaceApplicationResult"
]:
import capo_workspaces._operations.workspaces_service.associate_workspace_application
(
output,
http_response,
) = await capo_workspaces._operations.workspaces_service.associate_workspace_application.async_associate_workspace_application(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AssociateWorkspaceApplication")
)
input_: capo_workspaces.types.associate_workspace_application_request.AssociateWorkspaceApplicationRequest = {
"workspace_id": workspace_id,
"application_id": application_id,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|