Skip to content

list_hosted_configuration_versions

list_hosted_configuration_versions(
    application_id: Name,
    configuration_profile_id: LongName,
    *,
    config_overrides: Optional[AppConfigClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
    version_label: Optional[QueryName] = None,
) -> HostedConfigurationVersions

Lists configurations stored in the AppConfig hosted configuration store by version.

Parameters:

  • application_id (Name) –

    The application ID.

  • configuration_profile_id (LongName) –

    The configuration profile ID.

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

    The maximum number of items to return for this call. If MaxResults is not provided in the call, AppConfig returns the maximum of 50. The call also returns a token that you can specify in a subsequent call to get the next set of results.

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

    A token to start the list. Use this token to get the next set of results.

  • version_label (Optional[QueryName], default: None ) –

    An optional filter that can be used to specify the version label of an AppConfig hosted configuration version. This parameter supports filtering by prefix using a wildcard, for example "v2*". If you don't specify an asterisk at the end of the value, only an exact match is returned.

Raises:

Examples:

To list the available hosted configuration versions The following list-hosted-configuration-versions example lists the configurations versions hosted in the AWS AppConfig hosted configuration store for the specified application and configuration profile.

>>> client.list_hosted_configuration_versions(application_id='339ohji', configuration_profile_id='ur8hx2f')
Source code in docs_src/capo_appconfig/_services/app_config.py
def list_hosted_configuration_versions(
    self,
    application_id: "capo_appconfig.types.name.Name",
    configuration_profile_id: "capo_appconfig.types.long_name.LongName",
    *,
    config_overrides: Optional[AppConfigClientConfig] = None,
    max_results: Optional["capo_appconfig.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_appconfig.types.next_token.NextToken"] = None,
    version_label: Optional["capo_appconfig.types.query_name.QueryName"] = None,
) -> (
    "capo_appconfig.types.hosted_configuration_versions.HostedConfigurationVersions"
):
    """<p>Lists configurations stored in the AppConfig hosted configuration store by version. </p>

    Args:
        application_id: <p>The application ID.</p>
        configuration_profile_id: <p>The configuration profile ID.</p>
        max_results: <p>The maximum number of items to return for this call. If <code>MaxResults</code> is not provided in the call, AppConfig returns the maximum of 50. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
        next_token: <p>A token to start the list. Use this token to get the next set of results. </p>
        version_label: <p>An optional filter that can be used to specify the version label of an AppConfig hosted configuration version. This parameter supports filtering by prefix using a wildcard, for example "v2*". If you don't specify an asterisk at the end of the value, only an exact match is returned.</p>

    Raises:
        capo_appconfig.errors.bad_request_exception.BadRequestException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_appconfig.errors.internal_server_exception.InternalServerException: <p>There was an internal failure in the AppConfig service.</p>
        capo_appconfig.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
        capo_appconfig.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To list the available hosted configuration versions
        The following list-hosted-configuration-versions example lists the configurations versions hosted in the AWS AppConfig hosted configuration store for the specified application and configuration profile.

        >>> client.list_hosted_configuration_versions(application_id='339ohji', configuration_profile_id='ur8hx2f')
    """

    def _handler(
        req: "OperationRequest[capo_appconfig.types.list_hosted_configuration_versions_request.ListHostedConfigurationVersionsRequest]",
    ) -> OperationResponse[
        "capo_appconfig.types.hosted_configuration_versions.HostedConfigurationVersions"
    ]:
        import capo_appconfig._operations.amazon_app_config.list_hosted_configuration_versions

        output, http_response = (
            capo_appconfig._operations.amazon_app_config.list_hosted_configuration_versions.list_hosted_configuration_versions(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListHostedConfigurationVersions")
    )
    input_: capo_appconfig.types.list_hosted_configuration_versions_request.ListHostedConfigurationVersionsRequest = {
        "application_id": application_id,
        "configuration_profile_id": configuration_profile_id,
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if version_label is not None:
        input_["version_label"] = version_label

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output