Skip to content

describe_image_permissions async

describe_image_permissions(
    *,
    config_overrides: Optional[AsyncAppStreamClientConfig] = None,
    name: Optional[Name] = None,
    max_results: Optional[MaxResults] = None,
    shared_aws_account_ids: Optional[AwsAccountIdList] = None,
    next_token: Optional[String] = None,
) -> DescribeImagePermissionsResult

Retrieves a list that describes the permissions for shared AWS account IDs on a private image that you own.

Parameters:

  • name (Optional[Name], default: None ) –

    The name of the private image for which to describe permissions. The image must be one that you own.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum size of each page of results.

  • shared_aws_account_ids (Optional[AwsAccountIdList], default: None ) –

    The 12-digit identifier of one or more AWS accounts with which the image is shared.

  • next_token (Optional[String], default: None ) –

    The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.

Raises:

Source code in docs_src/capo_appstream/_services/async_app_stream.py
async def describe_image_permissions(
    self,
    *,
    config_overrides: Optional[AsyncAppStreamClientConfig] = None,
    name: Optional["capo_appstream.types.name.Name"] = None,
    max_results: Optional["capo_appstream.types.max_results.MaxResults"] = None,
    shared_aws_account_ids: Optional[
        "capo_appstream.types.aws_account_id_list.AwsAccountIdList"
    ] = None,
    next_token: Optional["capo_appstream.types.string.String"] = None,
) -> "capo_appstream.types.describe_image_permissions_result.DescribeImagePermissionsResult":
    """<p>Retrieves a list that describes the permissions for shared AWS account IDs on a private image that you own. </p>

    Args:
        name: <p>The name of the private image for which to describe permissions. The image must be one that you own. </p>
        max_results: <p>The maximum size of each page of results.</p>
        shared_aws_account_ids: <p>The 12-digit identifier of one or more AWS accounts with which the image is shared.</p>
        next_token: <p>The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.</p>

    Raises:
        capo_appstream.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_appstream.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appstream.types.describe_image_permissions_request.DescribeImagePermissionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_appstream.types.describe_image_permissions_result.DescribeImagePermissionsResult"
    ]:
        import capo_appstream._operations.photon_admin_proxy_service.describe_image_permissions

        (
            output,
            http_response,
        ) = await capo_appstream._operations.photon_admin_proxy_service.describe_image_permissions.async_describe_image_permissions(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeImagePermissions")
    )
    input_: capo_appstream.types.describe_image_permissions_request.DescribeImagePermissionsRequest = {}
    if name is not None:
        input_["name"] = name
    if max_results is not None:
        input_["max_results"] = max_results
    if shared_aws_account_ids is not None:
        input_["shared_aws_account_ids"] = shared_aws_account_ids
    if next_token is not None:
        input_["next_token"] = next_token

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