Interface AppConfigCloudExtensionAsyncClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a builder that can be used to configure and create aAppConfigCloudExtensionAsyncClient.create()Create aAppConfigCloudExtensionAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.getConfiguration(Consumer<GetConfigurationRequest.Builder> getConfigurationRequest) Returns the latest deployed configuration for an application, environment, and configuration profile, served from the Extension's local cache.getConfiguration(GetConfigurationRequest getConfigurationRequest) Returns the latest deployed configuration for an application, environment, and configuration profile, served from the Extension's local cache.default CompletableFuture<GetFlagResponse> getFlag(Consumer<GetFlagRequest.Builder> getFlagRequest) Returns one flag of a feature flag configuration profile from the Extension's local cache.default CompletableFuture<GetFlagResponse> getFlag(GetFlagRequest getFlagRequest) Returns one flag of a feature flag configuration profile from the Extension's local cache.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
-
-
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 invokeThrowable.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.Builderavoiding the need to create one manually viaGetConfigurationRequest.builder()- Parameters:
getConfigurationRequest- AConsumerthat will call methods onGetConfigurationRequest.Builderto 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 invokeThrowable.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.
- 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 invokeThrowable.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.Builderavoiding the need to create one manually viaGetFlagRequest.builder()- Parameters:
getFlagRequest- AConsumerthat will call methods onGetFlagRequest.Builderto 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 invokeThrowable.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
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-
create
Create aAppConfigCloudExtensionAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aAppConfigCloudExtensionAsyncClient.
-