Skip to content

list_platform_versions async

list_platform_versions(
    *,
    config_overrides: Optional[AsyncElasticBeanstalkClientConfig] = None,
    filters: Optional[PlatformFilters] = None,
    max_records: Optional[PlatformMaxRecords] = None,
    next_token: Optional[Token] = None,
) -> ListPlatformVersionsResult

Lists the platform versions available for your account in an Amazon Web Services Region. Provides summary information about each platform version. Compare to DescribePlatformVersion, which provides full details about a single platform version.

This action only returns information about platform versions that the calling principle has IAM permissions to access. For example, consider a case where a user only has permission to access one of ten platform versions. When the user calls the ListPlatformVersions action, the response will only include the one platform version that the user has permission to access instead of all ten platform versions. If the user doesn’t have access to any of the platform versions an empty result is returned.

The AWSElasticBeanstalkReadOnly managed policy allows operators to view information about resources related to Elastic Beanstalk environments. For more information, see Managing Elastic Beanstalk user policies in the Elastic Beanstalk Developer Guide. For detailed instructions to attach a policy to a user or group, see the section Controlling access with managed policies in the same topic.

For definitions of platform version and other platform-related terms, see Elastic Beanstalk Platforms Glossary.

Parameters:

  • filters (Optional[PlatformFilters], default: None ) –

    Criteria for restricting the resulting list of platform versions. The filter is interpreted as a logical conjunction (AND) of the separate PlatformFilter terms.

  • max_records (Optional[PlatformMaxRecords], default: None ) –

    The maximum number of platform version values returned in one call.

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

    For a paginated request. Specify a token from a previous response page to retrieve the next response page. All other parameter values must be identical to the ones specified in the initial request.

    If no NextToken is specified, the first page is retrieved.

Raises:

Source code in docs_src/capo_elastic_beanstalk/_services/async_elastic_beanstalk.py
async def list_platform_versions(
    self,
    *,
    config_overrides: Optional[AsyncElasticBeanstalkClientConfig] = None,
    filters: Optional[
        "capo_elastic_beanstalk.types.platform_filters.PlatformFilters"
    ] = None,
    max_records: Optional[
        "capo_elastic_beanstalk.types.platform_max_records.PlatformMaxRecords"
    ] = None,
    next_token: Optional["capo_elastic_beanstalk.types.token.Token"] = None,
) -> "capo_elastic_beanstalk.types.list_platform_versions_result.ListPlatformVersionsResult":
    """<p>Lists the platform versions available for your account in an Amazon Web Services Region. Provides summary information about each platform version. Compare to <a>DescribePlatformVersion</a>, which provides full details about a single platform version.</p> <p>This action only returns information about platform versions that the calling principle has IAM permissions to access. For example, consider a case where a user only has permission to access one of ten platform versions. When the user calls the <i>ListPlatformVersions</i> action, the response will only include the one platform version that the user has permission to access instead of all ten platform versions. If the user doesn’t have access to any of the platform versions an empty result is returned.</p> <note> <p>The <i>AWSElasticBeanstalkReadOnly</i> managed policy allows operators to view information about resources related to Elastic Beanstalk environments. For more information, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.iam.managed-policies.html"> Managing Elastic Beanstalk user policies</a> in the <i>Elastic Beanstalk Developer Guide</i>. For detailed instructions to attach a policy to a user or group, see the section <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.iam.managed-policies.html#iam-userpolicies-managed"> Controlling access with managed policies</a> in the same topic.</p> </note> <p>For definitions of platform version and other platform-related terms, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-glossary.html">Elastic Beanstalk Platforms Glossary</a>.</p>

    Args:
        filters: <p>Criteria for restricting the resulting list of platform versions. The filter is interpreted as a logical conjunction (AND) of the separate <code>PlatformFilter</code> terms.</p>
        max_records: <p>The maximum number of platform version values returned in one call.</p>
        next_token: <p>For a paginated request. Specify a token from a previous response page to retrieve the next response page. All other parameter values must be identical to the ones specified in the initial request.</p> <p>If no <code>NextToken</code> is specified, the first page is retrieved.</p>

    Raises:
        capo_elastic_beanstalk.errors.elastic_beanstalk_service_exception.ElasticBeanstalkServiceException: <p>A generic service exception has occurred.</p>
        capo_elastic_beanstalk.errors.insufficient_privileges_exception.InsufficientPrivilegesException: <p>The specified account does not have sufficient privileges for one or more Amazon Web Services services.</p>
        capo_elastic_beanstalk.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_elastic_beanstalk.types.list_platform_versions_request.ListPlatformVersionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_elastic_beanstalk.types.list_platform_versions_result.ListPlatformVersionsResult"
    ]:
        import capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.list_platform_versions

        (
            output,
            http_response,
        ) = await capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.list_platform_versions.async_list_platform_versions(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListPlatformVersions")
    )
    input_: capo_elastic_beanstalk.types.list_platform_versions_request.ListPlatformVersionsRequest = {}
    if filters is not None:
        input_["filters"] = filters
    if max_records is not None:
        input_["max_records"] = max_records
    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