Describes the associations between the applications and the specified image.
Parameters:
Raises:
Source code in docs_src/capo_workspaces/_services/async_work_spaces.py
| async def describe_image_associations(
self,
image_id: "capo_workspaces.types.workspace_image_id.WorkspaceImageId",
associated_resource_types: "capo_workspaces.types.image_associated_resource_type_list.ImageAssociatedResourceTypeList",
*,
config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
) -> "capo_workspaces.types.describe_image_associations_result.DescribeImageAssociationsResult":
"""<p>Describes the associations between the applications and the specified image.</p>
Args:
image_id: <p>The identifier of the image.</p>
associated_resource_types: <p>The resource types of the associated resource.</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.describe_image_associations_request.DescribeImageAssociationsRequest]",
) -> AsyncOperationResponse[
"capo_workspaces.types.describe_image_associations_result.DescribeImageAssociationsResult"
]:
import capo_workspaces._operations.workspaces_service.describe_image_associations
(
output,
http_response,
) = await capo_workspaces._operations.workspaces_service.describe_image_associations.async_describe_image_associations(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeImageAssociations")
)
input_: capo_workspaces.types.describe_image_associations_request.DescribeImageAssociationsRequest = {
"image_id": image_id,
"associated_resource_types": associated_resource_types,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|