Skip to content

get_configuration

get_configuration(
    application: Identifier,
    environment: Identifier,
    configuration: ConfigurationIdentifier,
    *,
    config_overrides: Optional[AppConfigCloudExtensionClientConfig] = None,
) -> GetConfigurationResponse

Returns the latest deployed configuration for an application, environment, and configuration profile, served from the Extension's local cache. The Extension keeps the cache current by polling AWS AppConfig in the background, so repeated calls don't call AWS AppConfig.

Parameters:

  • application (Identifier) –

    The name or ID of the AWS AppConfig application.

  • environment (Identifier) –

    The name or ID of the AWS AppConfig environment the configuration is deployed to.

  • configuration (ConfigurationIdentifier) –

    The name or ID of the AWS AppConfig configuration profile.

Raises:

  • AccessDeniedException –

    Access was denied. The reason says whether AWS Cloud Extensions couldn't authenticate the caller, or a service the Extension calls denied it.

  • BadGatewayException –

    No usable answer came back: from the service AWS Cloud Extensions retrieves its profile from, from the Extension, or from a service the Extension calls. The reason says what to do, such as fixing the profile or role, checking the Extension's settings, or using an earlier version of the Extension.

  • InternalServerException –

    An unexpected internal error occurred. Retry the request.

  • LoopDetectedException –

    The request is part of a chain of calls that loops back through AWS Cloud Extensions.

  • RequestEntityTooLargeException –

    The request body is larger than AWS Cloud Extensions accepts.

  • ServiceUnavailableException –

    AWS Cloud Extensions can't serve the request now. Retry it.

  • ThrottlingException –

    The call was throttled. Retry after the time Retry-After gives, when it is set. The reason says what throttled it.

  • UpgradeRequiredException –

    The Extension needs a newer version of AWS Cloud Extensions. Upgrade it, or use an earlier version of the Extension.

  • ValidationException –

    The request does not fit the operation's model. The message describes every failure and may change; read reason and errors to act on them.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_appconfigcloudextension/_services/app_config_cloud_extension.py
def get_configuration(
    self,
    application: "capo_appconfigcloudextension.types.identifier.Identifier",
    environment: "capo_appconfigcloudextension.types.identifier.Identifier",
    configuration: "capo_appconfigcloudextension.types.configuration_identifier.ConfigurationIdentifier",
    *,
    config_overrides: Optional[AppConfigCloudExtensionClientConfig] = None,
) -> "capo_appconfigcloudextension.types.get_configuration_response.GetConfigurationResponse":
    """Returns the latest deployed configuration for an application, environment, and configuration profile, served from the Extension's local cache. The Extension keeps the cache current by polling AWS AppConfig in the background, so repeated calls don't call AWS AppConfig.

    Args:
        application: The name or ID of the AWS AppConfig application.
        environment: The name or ID of the AWS AppConfig environment the configuration is deployed to.
        configuration: The name or ID of the AWS AppConfig configuration profile.

    Raises:
        capo_appconfigcloudextension.errors.access_denied_exception.AccessDeniedException: Access was denied. The reason says whether AWS Cloud Extensions couldn't authenticate the caller, or a service the Extension calls denied it.
        capo_appconfigcloudextension.errors.bad_gateway_exception.BadGatewayException: No usable answer came back: from the service AWS Cloud Extensions retrieves its profile from, from the Extension, or from a service the Extension calls. The reason says what to do, such as fixing the profile or role, checking the Extension's settings, or using an earlier version of the Extension.
        capo_appconfigcloudextension.errors.internal_server_exception.InternalServerException: An unexpected internal error occurred. Retry the request.
        capo_appconfigcloudextension.errors.loop_detected_exception.LoopDetectedException: The request is part of a chain of calls that loops back through AWS Cloud Extensions.
        capo_appconfigcloudextension.errors.request_entity_too_large_exception.RequestEntityTooLargeException: The request body is larger than AWS Cloud Extensions accepts.
        capo_appconfigcloudextension.errors.service_unavailable_exception.ServiceUnavailableException: AWS Cloud Extensions can't serve the request now. Retry it.
        capo_appconfigcloudextension.errors.throttling_exception.ThrottlingException: The call was throttled. Retry after the time Retry-After gives, when it is set. The reason says what throttled it.
        capo_appconfigcloudextension.errors.upgrade_required_exception.UpgradeRequiredException: The Extension needs a newer version of AWS Cloud Extensions. Upgrade it, or use an earlier version of the Extension.
        capo_appconfigcloudextension.errors.validation_exception.ValidationException: The request does not fit the operation's model. The message describes every failure and may change; read reason and errors to act on them.
        capo_appconfigcloudextension.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_appconfigcloudextension.types.get_configuration_request.GetConfigurationRequest]",
    ) -> OperationResponse[
        "capo_appconfigcloudextension.types.get_configuration_response.GetConfigurationResponse"
    ]:
        import capo_appconfigcloudextension._operations.app_config.get_configuration

        output, http_response = (
            capo_appconfigcloudextension._operations.app_config.get_configuration.get_configuration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetConfiguration")
    )
    input_: capo_appconfigcloudextension.types.get_configuration_request.GetConfigurationRequest = {
        "application": application,
        "environment": environment,
        "configuration": configuration,
    }

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