Interface AppConfigCloudExtensionAsyncClient

All Superinterfaces:
AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

@Generated("software.amazon.awssdk:codegen") @SdkPublicApi @ThreadSafe public interface AppConfigCloudExtensionAsyncClient extends AwsClient
Service client for accessing AWS AppConfig Cloud Extension asynchronously. This can be created using the static builder() method.The asynchronous client performs non-blocking I/O when configured with any SdkAsyncHttpClient supported in the SDK. However, full non-blocking is not guaranteed as the async client may perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API call.

Serves AWS AppConfig configurations and feature flags from a local cache through the AWS Cloud Extensions runtime. By default, send requests to http://localhost:5333/appconfig.

  • Field Details

  • Method Details

    • getConfiguration

      default CompletableFuture<GetConfigurationResponse> getConfiguration(GetConfigurationRequest getConfigurationRequest)

      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:
      getConfigurationRequest - The input of GetConfiguration.
      Returns:
      A Java Future containing the result of the GetConfiguration operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying 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.
      • AccessDeniedException Access was denied. The reason says whether AWS Cloud Extensions couldn't authenticate the caller, or a service the Extension calls denied it.
      • ServiceUnavailableException AWS Cloud Extensions can't serve the request now. Retry it.
      • RequestEntityTooLargeException The request body is larger than AWS Cloud Extensions accepts.
      • 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.
      • 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.
      • 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.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • AppConfigCloudExtensionException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getConfiguration

      default CompletableFuture<GetConfigurationResponse> getConfiguration(Consumer<GetConfigurationRequest.Builder> getConfigurationRequest)

      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.


      This is a convenience which creates an instance of the GetConfigurationRequest.Builder avoiding the need to create one manually via GetConfigurationRequest.builder()

      Parameters:
      getConfigurationRequest - A Consumer that will call methods on GetConfigurationRequest.Builder to create a request. The input of GetConfiguration.
      Returns:
      A Java Future containing the result of the GetConfiguration operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying 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.
      • AccessDeniedException Access was denied. The reason says whether AWS Cloud Extensions couldn't authenticate the caller, or a service the Extension calls denied it.
      • ServiceUnavailableException AWS Cloud Extensions can't serve the request now. Retry it.
      • RequestEntityTooLargeException The request body is larger than AWS Cloud Extensions accepts.
      • 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.
      • 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.
      • 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.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • AppConfigCloudExtensionException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getFlag

      default CompletableFuture<GetFlagResponse> getFlag(GetFlagRequest getFlagRequest)

      Returns one flag of a feature flag configuration profile from the Extension's local cache. For a profile with variants, the flag's rules are evaluated locally against the request context.

      Parameters:
      getFlagRequest - The input of GetFlag.
      Returns:
      A Java Future containing the result of the GetFlag operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying 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.
      • AccessDeniedException Access was denied. The reason says whether AWS Cloud Extensions couldn't authenticate the caller, or a service the Extension calls denied it.
      • ServiceUnavailableException AWS Cloud Extensions can't serve the request now. Retry it.
      • RequestEntityTooLargeException The request body is larger than AWS Cloud Extensions accepts.
      • 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.
      • 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.
      • 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.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • AppConfigCloudExtensionException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getFlag

      Returns one flag of a feature flag configuration profile from the Extension's local cache. For a profile with variants, the flag's rules are evaluated locally against the request context.


      This is a convenience which creates an instance of the GetFlagRequest.Builder avoiding the need to create one manually via GetFlagRequest.builder()

      Parameters:
      getFlagRequest - A Consumer that will call methods on GetFlagRequest.Builder to create a request. The input of GetFlag.
      Returns:
      A Java Future containing the result of the GetFlag operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying 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.
      • AccessDeniedException Access was denied. The reason says whether AWS Cloud Extensions couldn't authenticate the caller, or a service the Extension calls denied it.
      • ServiceUnavailableException AWS Cloud Extensions can't serve the request now. Retry it.
      • RequestEntityTooLargeException The request body is larger than AWS Cloud Extensions accepts.
      • 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.
      • 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.
      • 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.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • AppConfigCloudExtensionException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • serviceClientConfiguration

      default AppConfigCloudExtensionServiceClientConfiguration serviceClientConfiguration()
      Description copied from interface: SdkClient
      The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration
      Specified by:
      serviceClientConfiguration in interface AwsClient
      Specified by:
      serviceClientConfiguration in interface SdkClient
      Returns:
      SdkServiceClientConfiguration
    • create

      Create a AppConfigCloudExtensionAsyncClient with the region loaded from the DefaultAwsRegionProviderChain and credentials loaded from the DefaultCredentialsProvider.
    • builder

      Create a builder that can be used to configure and create a AppConfigCloudExtensionAsyncClient.