Skip to content

describe_workspace_images async

describe_workspace_images(
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
    image_ids: Optional[WorkspaceImageIdList] = None,
    image_type: Optional[ImageType] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[Limit] = None,
) -> DescribeWorkspaceImagesResult

Retrieves a list that describes one or more specified images, if the image identifiers are provided. Otherwise, all images in the account are described.

Parameters:

  • image_ids (Optional[WorkspaceImageIdList], default: None ) –

    The identifier of the image.

  • image_type (Optional[ImageType], default: None ) –

    The type (owned or shared) 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/async_work_spaces.py
async def describe_workspace_images(
    self,
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
    image_ids: Optional[
        "capo_workspaces.types.workspace_image_id_list.WorkspaceImageIdList"
    ] = None,
    image_type: Optional["capo_workspaces.types.image_type.ImageType"] = 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_images_result.DescribeWorkspaceImagesResult":
    """<p>Retrieves a list that describes one or more specified images, if the image identifiers are provided. Otherwise, all images in the account are described. </p>

    Args:
        image_ids: <p>The identifier of the image.</p>
        image_type: <p>The type (owned or shared) 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.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_workspaces.types.describe_workspace_images_request.DescribeWorkspaceImagesRequest]",
    ) -> AsyncOperationResponse[
        "capo_workspaces.types.describe_workspace_images_result.DescribeWorkspaceImagesResult"
    ]:
        import capo_workspaces._operations.workspaces_service.describe_workspace_images

        (
            output,
            http_response,
        ) = await capo_workspaces._operations.workspaces_service.describe_workspace_images.async_describe_workspace_images(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeWorkspaceImages")
    )
    input_: capo_workspaces.types.describe_workspace_images_request.DescribeWorkspaceImagesRequest = {}
    if image_ids is not None:
        input_["image_ids"] = image_ids
    if image_type is not None:
        input_["image_type"] = image_type
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output