Describes the permissions that the owner of an image has granted to other Amazon Web Services accounts for an image.
Parameters:
-
image_id
(WorkspaceImageId)
–
The identifier of the image.
-
next_token
(Optional[PaginationToken], default:
None
)
–
If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.
-
max_results
(Optional[Limit], default:
None
)
–
The maximum number of items to return.
Raises:
Source code in docs_src/capo_workspaces/_services/work_spaces.py
| def describe_workspace_image_permissions(
self,
image_id: "capo_workspaces.types.workspace_image_id.WorkspaceImageId",
*,
config_overrides: Optional[WorkSpacesClientConfig] = None,
next_token: Optional[
"capo_workspaces.types.pagination_token.PaginationToken"
] = None,
max_results: Optional["capo_workspaces.types.limit.Limit"] = None,
) -> "capo_workspaces.types.describe_workspace_image_permissions_result.DescribeWorkspaceImagePermissionsResult":
"""<p>Describes the permissions that the owner of an image has granted to other Amazon Web Services accounts for an image.</p>
Args:
image_id: <p>The identifier of the image.</p>
next_token: <p>If you received a <code>NextToken</code> from a previous call that was paginated, provide this token to receive the next set of results.</p>
max_results: <p>The maximum number of items to return.</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.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.
"""
def _handler(
req: "OperationRequest[capo_workspaces.types.describe_workspace_image_permissions_request.DescribeWorkspaceImagePermissionsRequest]",
) -> OperationResponse[
"capo_workspaces.types.describe_workspace_image_permissions_result.DescribeWorkspaceImagePermissionsResult"
]:
import capo_workspaces._operations.workspaces_service.describe_workspace_image_permissions
output, http_response = (
capo_workspaces._operations.workspaces_service.describe_workspace_image_permissions.describe_workspace_image_permissions(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeWorkspaceImagePermissions")
)
input_: capo_workspaces.types.describe_workspace_image_permissions_request.DescribeWorkspaceImagePermissionsRequest = {
"image_id": image_id
}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|