Skip to content

get_hosted_configuration_version async

get_hosted_configuration_version(
    application_id: Name,
    configuration_profile_id: LongName,
    version_number: Integer,
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
) -> HostedConfigurationVersion

Retrieves information about a specific configuration version.

Parameters:

  • application_id (Name) –

    The application ID.

  • configuration_profile_id (LongName) –

    The configuration profile ID.

  • version_number (Integer) –

    The version.

Raises:

Examples:

To retrieve hosted configuration details The following get-hosted-configuration-version example retrieves the configuration details of the AWS AppConfig hosted configuration.

>>> await client.get_hosted_configuration_version(application_id='339ohji', configuration_profile_id='ur8hx2f', version_number=1)
Source code in docs_src/capo_appconfig/_services/async_app_config.py
async def get_hosted_configuration_version(
    self,
    application_id: "capo_appconfig.types.name.Name",
    configuration_profile_id: "capo_appconfig.types.long_name.LongName",
    version_number: "capo_appconfig.types.integer.Integer",
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
) -> "capo_appconfig.types.hosted_configuration_version.HostedConfigurationVersion":
    """<p>Retrieves information about a specific configuration version.</p>

    Args:
        application_id: <p>The application ID.</p>
        configuration_profile_id: <p>The configuration profile ID.</p>
        version_number: <p>The version.</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 retrieve hosted configuration details
        The following get-hosted-configuration-version example retrieves the configuration details of the AWS AppConfig hosted configuration.

        >>> await client.get_hosted_configuration_version(application_id='339ohji', configuration_profile_id='ur8hx2f', version_number=1)
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appconfig.types.get_hosted_configuration_version_request.GetHostedConfigurationVersionRequest]",
    ) -> AsyncOperationResponse[
        "capo_appconfig.types.hosted_configuration_version.HostedConfigurationVersion"
    ]:
        import capo_appconfig._operations.amazon_app_config.get_hosted_configuration_version

        (
            output,
            http_response,
        ) = await capo_appconfig._operations.amazon_app_config.get_hosted_configuration_version.async_get_hosted_configuration_version(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_appconfig.types.hosted_configuration_version.HostedConfigurationVersion",
    ) -> dict[str, Any]:
        import capo_appconfig.types.hosted_configuration_version

        return capo_appconfig.types.hosted_configuration_version.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "GetHostedConfigurationVersion", redact_output=_redact_output
        ),
    )
    input_: capo_appconfig.types.get_hosted_configuration_version_request.GetHostedConfigurationVersionRequest = {
        "application_id": application_id,
        "configuration_profile_id": configuration_profile_id,
        "version_number": version_number,
    }

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