software.amazon.awssdk.services.elasticache.DefaultElastiCacheAsyncClient Maven / Gradle / Ivy
Show all versions of elasticache Show documentation
/*
* Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.elasticache;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.awscore.client.handler.AwsAsyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.ApiName;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.handler.AsyncClientHandler;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.util.VersionInfo;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.query.AwsQueryProtocolFactory;
import software.amazon.awssdk.services.elasticache.model.AddTagsToResourceRequest;
import software.amazon.awssdk.services.elasticache.model.AddTagsToResourceResponse;
import software.amazon.awssdk.services.elasticache.model.ApiCallRateForCustomerExceededException;
import software.amazon.awssdk.services.elasticache.model.AuthorizationAlreadyExistsException;
import software.amazon.awssdk.services.elasticache.model.AuthorizationNotFoundException;
import software.amazon.awssdk.services.elasticache.model.AuthorizeCacheSecurityGroupIngressRequest;
import software.amazon.awssdk.services.elasticache.model.AuthorizeCacheSecurityGroupIngressResponse;
import software.amazon.awssdk.services.elasticache.model.BatchApplyUpdateActionRequest;
import software.amazon.awssdk.services.elasticache.model.BatchApplyUpdateActionResponse;
import software.amazon.awssdk.services.elasticache.model.BatchStopUpdateActionRequest;
import software.amazon.awssdk.services.elasticache.model.BatchStopUpdateActionResponse;
import software.amazon.awssdk.services.elasticache.model.CacheClusterAlreadyExistsException;
import software.amazon.awssdk.services.elasticache.model.CacheClusterNotFoundException;
import software.amazon.awssdk.services.elasticache.model.CacheParameterGroupAlreadyExistsException;
import software.amazon.awssdk.services.elasticache.model.CacheParameterGroupNotFoundException;
import software.amazon.awssdk.services.elasticache.model.CacheParameterGroupQuotaExceededException;
import software.amazon.awssdk.services.elasticache.model.CacheSecurityGroupAlreadyExistsException;
import software.amazon.awssdk.services.elasticache.model.CacheSecurityGroupNotFoundException;
import software.amazon.awssdk.services.elasticache.model.CacheSecurityGroupQuotaExceededException;
import software.amazon.awssdk.services.elasticache.model.CacheSubnetGroupAlreadyExistsException;
import software.amazon.awssdk.services.elasticache.model.CacheSubnetGroupInUseException;
import software.amazon.awssdk.services.elasticache.model.CacheSubnetGroupNotFoundException;
import software.amazon.awssdk.services.elasticache.model.CacheSubnetGroupQuotaExceededException;
import software.amazon.awssdk.services.elasticache.model.CacheSubnetQuotaExceededException;
import software.amazon.awssdk.services.elasticache.model.ClusterQuotaForCustomerExceededException;
import software.amazon.awssdk.services.elasticache.model.CopySnapshotRequest;
import software.amazon.awssdk.services.elasticache.model.CopySnapshotResponse;
import software.amazon.awssdk.services.elasticache.model.CreateCacheClusterRequest;
import software.amazon.awssdk.services.elasticache.model.CreateCacheClusterResponse;
import software.amazon.awssdk.services.elasticache.model.CreateCacheParameterGroupRequest;
import software.amazon.awssdk.services.elasticache.model.CreateCacheParameterGroupResponse;
import software.amazon.awssdk.services.elasticache.model.CreateCacheSecurityGroupRequest;
import software.amazon.awssdk.services.elasticache.model.CreateCacheSecurityGroupResponse;
import software.amazon.awssdk.services.elasticache.model.CreateCacheSubnetGroupRequest;
import software.amazon.awssdk.services.elasticache.model.CreateCacheSubnetGroupResponse;
import software.amazon.awssdk.services.elasticache.model.CreateReplicationGroupRequest;
import software.amazon.awssdk.services.elasticache.model.CreateReplicationGroupResponse;
import software.amazon.awssdk.services.elasticache.model.CreateSnapshotRequest;
import software.amazon.awssdk.services.elasticache.model.CreateSnapshotResponse;
import software.amazon.awssdk.services.elasticache.model.DecreaseReplicaCountRequest;
import software.amazon.awssdk.services.elasticache.model.DecreaseReplicaCountResponse;
import software.amazon.awssdk.services.elasticache.model.DeleteCacheClusterRequest;
import software.amazon.awssdk.services.elasticache.model.DeleteCacheClusterResponse;
import software.amazon.awssdk.services.elasticache.model.DeleteCacheParameterGroupRequest;
import software.amazon.awssdk.services.elasticache.model.DeleteCacheParameterGroupResponse;
import software.amazon.awssdk.services.elasticache.model.DeleteCacheSecurityGroupRequest;
import software.amazon.awssdk.services.elasticache.model.DeleteCacheSecurityGroupResponse;
import software.amazon.awssdk.services.elasticache.model.DeleteCacheSubnetGroupRequest;
import software.amazon.awssdk.services.elasticache.model.DeleteCacheSubnetGroupResponse;
import software.amazon.awssdk.services.elasticache.model.DeleteReplicationGroupRequest;
import software.amazon.awssdk.services.elasticache.model.DeleteReplicationGroupResponse;
import software.amazon.awssdk.services.elasticache.model.DeleteSnapshotRequest;
import software.amazon.awssdk.services.elasticache.model.DeleteSnapshotResponse;
import software.amazon.awssdk.services.elasticache.model.DescribeCacheClustersRequest;
import software.amazon.awssdk.services.elasticache.model.DescribeCacheClustersResponse;
import software.amazon.awssdk.services.elasticache.model.DescribeCacheEngineVersionsRequest;
import software.amazon.awssdk.services.elasticache.model.DescribeCacheEngineVersionsResponse;
import software.amazon.awssdk.services.elasticache.model.DescribeCacheParameterGroupsRequest;
import software.amazon.awssdk.services.elasticache.model.DescribeCacheParameterGroupsResponse;
import software.amazon.awssdk.services.elasticache.model.DescribeCacheParametersRequest;
import software.amazon.awssdk.services.elasticache.model.DescribeCacheParametersResponse;
import software.amazon.awssdk.services.elasticache.model.DescribeCacheSecurityGroupsRequest;
import software.amazon.awssdk.services.elasticache.model.DescribeCacheSecurityGroupsResponse;
import software.amazon.awssdk.services.elasticache.model.DescribeCacheSubnetGroupsRequest;
import software.amazon.awssdk.services.elasticache.model.DescribeCacheSubnetGroupsResponse;
import software.amazon.awssdk.services.elasticache.model.DescribeEngineDefaultParametersRequest;
import software.amazon.awssdk.services.elasticache.model.DescribeEngineDefaultParametersResponse;
import software.amazon.awssdk.services.elasticache.model.DescribeEventsRequest;
import software.amazon.awssdk.services.elasticache.model.DescribeEventsResponse;
import software.amazon.awssdk.services.elasticache.model.DescribeReplicationGroupsRequest;
import software.amazon.awssdk.services.elasticache.model.DescribeReplicationGroupsResponse;
import software.amazon.awssdk.services.elasticache.model.DescribeReservedCacheNodesOfferingsRequest;
import software.amazon.awssdk.services.elasticache.model.DescribeReservedCacheNodesOfferingsResponse;
import software.amazon.awssdk.services.elasticache.model.DescribeReservedCacheNodesRequest;
import software.amazon.awssdk.services.elasticache.model.DescribeReservedCacheNodesResponse;
import software.amazon.awssdk.services.elasticache.model.DescribeServiceUpdatesRequest;
import software.amazon.awssdk.services.elasticache.model.DescribeServiceUpdatesResponse;
import software.amazon.awssdk.services.elasticache.model.DescribeSnapshotsRequest;
import software.amazon.awssdk.services.elasticache.model.DescribeSnapshotsResponse;
import software.amazon.awssdk.services.elasticache.model.DescribeUpdateActionsRequest;
import software.amazon.awssdk.services.elasticache.model.DescribeUpdateActionsResponse;
import software.amazon.awssdk.services.elasticache.model.ElastiCacheException;
import software.amazon.awssdk.services.elasticache.model.ElastiCacheRequest;
import software.amazon.awssdk.services.elasticache.model.IncreaseReplicaCountRequest;
import software.amazon.awssdk.services.elasticache.model.IncreaseReplicaCountResponse;
import software.amazon.awssdk.services.elasticache.model.InsufficientCacheClusterCapacityException;
import software.amazon.awssdk.services.elasticache.model.InvalidArnException;
import software.amazon.awssdk.services.elasticache.model.InvalidCacheClusterStateException;
import software.amazon.awssdk.services.elasticache.model.InvalidCacheParameterGroupStateException;
import software.amazon.awssdk.services.elasticache.model.InvalidCacheSecurityGroupStateException;
import software.amazon.awssdk.services.elasticache.model.InvalidParameterCombinationException;
import software.amazon.awssdk.services.elasticache.model.InvalidParameterValueException;
import software.amazon.awssdk.services.elasticache.model.InvalidReplicationGroupStateException;
import software.amazon.awssdk.services.elasticache.model.InvalidSnapshotStateException;
import software.amazon.awssdk.services.elasticache.model.InvalidSubnetException;
import software.amazon.awssdk.services.elasticache.model.InvalidVpcNetworkStateException;
import software.amazon.awssdk.services.elasticache.model.ListAllowedNodeTypeModificationsRequest;
import software.amazon.awssdk.services.elasticache.model.ListAllowedNodeTypeModificationsResponse;
import software.amazon.awssdk.services.elasticache.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.elasticache.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.elasticache.model.ModifyCacheClusterRequest;
import software.amazon.awssdk.services.elasticache.model.ModifyCacheClusterResponse;
import software.amazon.awssdk.services.elasticache.model.ModifyCacheParameterGroupRequest;
import software.amazon.awssdk.services.elasticache.model.ModifyCacheParameterGroupResponse;
import software.amazon.awssdk.services.elasticache.model.ModifyCacheSubnetGroupRequest;
import software.amazon.awssdk.services.elasticache.model.ModifyCacheSubnetGroupResponse;
import software.amazon.awssdk.services.elasticache.model.ModifyReplicationGroupRequest;
import software.amazon.awssdk.services.elasticache.model.ModifyReplicationGroupResponse;
import software.amazon.awssdk.services.elasticache.model.ModifyReplicationGroupShardConfigurationRequest;
import software.amazon.awssdk.services.elasticache.model.ModifyReplicationGroupShardConfigurationResponse;
import software.amazon.awssdk.services.elasticache.model.NoOperationException;
import software.amazon.awssdk.services.elasticache.model.NodeGroupNotFoundException;
import software.amazon.awssdk.services.elasticache.model.NodeGroupsPerReplicationGroupQuotaExceededException;
import software.amazon.awssdk.services.elasticache.model.NodeQuotaForClusterExceededException;
import software.amazon.awssdk.services.elasticache.model.NodeQuotaForCustomerExceededException;
import software.amazon.awssdk.services.elasticache.model.PurchaseReservedCacheNodesOfferingRequest;
import software.amazon.awssdk.services.elasticache.model.PurchaseReservedCacheNodesOfferingResponse;
import software.amazon.awssdk.services.elasticache.model.RebootCacheClusterRequest;
import software.amazon.awssdk.services.elasticache.model.RebootCacheClusterResponse;
import software.amazon.awssdk.services.elasticache.model.RemoveTagsFromResourceRequest;
import software.amazon.awssdk.services.elasticache.model.RemoveTagsFromResourceResponse;
import software.amazon.awssdk.services.elasticache.model.ReplicationGroupAlreadyExistsException;
import software.amazon.awssdk.services.elasticache.model.ReplicationGroupNotFoundException;
import software.amazon.awssdk.services.elasticache.model.ReservedCacheNodeAlreadyExistsException;
import software.amazon.awssdk.services.elasticache.model.ReservedCacheNodeNotFoundException;
import software.amazon.awssdk.services.elasticache.model.ReservedCacheNodeQuotaExceededException;
import software.amazon.awssdk.services.elasticache.model.ReservedCacheNodesOfferingNotFoundException;
import software.amazon.awssdk.services.elasticache.model.ResetCacheParameterGroupRequest;
import software.amazon.awssdk.services.elasticache.model.ResetCacheParameterGroupResponse;
import software.amazon.awssdk.services.elasticache.model.RevokeCacheSecurityGroupIngressRequest;
import software.amazon.awssdk.services.elasticache.model.RevokeCacheSecurityGroupIngressResponse;
import software.amazon.awssdk.services.elasticache.model.ServiceLinkedRoleNotFoundException;
import software.amazon.awssdk.services.elasticache.model.ServiceUpdateNotFoundException;
import software.amazon.awssdk.services.elasticache.model.SnapshotAlreadyExistsException;
import software.amazon.awssdk.services.elasticache.model.SnapshotFeatureNotSupportedException;
import software.amazon.awssdk.services.elasticache.model.SnapshotNotFoundException;
import software.amazon.awssdk.services.elasticache.model.SnapshotQuotaExceededException;
import software.amazon.awssdk.services.elasticache.model.SubnetInUseException;
import software.amazon.awssdk.services.elasticache.model.TagNotFoundException;
import software.amazon.awssdk.services.elasticache.model.TagQuotaPerResourceExceededException;
import software.amazon.awssdk.services.elasticache.model.TestFailoverNotAvailableException;
import software.amazon.awssdk.services.elasticache.model.TestFailoverRequest;
import software.amazon.awssdk.services.elasticache.model.TestFailoverResponse;
import software.amazon.awssdk.services.elasticache.paginators.DescribeCacheClustersPublisher;
import software.amazon.awssdk.services.elasticache.paginators.DescribeCacheEngineVersionsPublisher;
import software.amazon.awssdk.services.elasticache.paginators.DescribeCacheParameterGroupsPublisher;
import software.amazon.awssdk.services.elasticache.paginators.DescribeCacheParametersPublisher;
import software.amazon.awssdk.services.elasticache.paginators.DescribeCacheSecurityGroupsPublisher;
import software.amazon.awssdk.services.elasticache.paginators.DescribeCacheSubnetGroupsPublisher;
import software.amazon.awssdk.services.elasticache.paginators.DescribeEngineDefaultParametersPublisher;
import software.amazon.awssdk.services.elasticache.paginators.DescribeEventsPublisher;
import software.amazon.awssdk.services.elasticache.paginators.DescribeReplicationGroupsPublisher;
import software.amazon.awssdk.services.elasticache.paginators.DescribeReservedCacheNodesOfferingsPublisher;
import software.amazon.awssdk.services.elasticache.paginators.DescribeReservedCacheNodesPublisher;
import software.amazon.awssdk.services.elasticache.paginators.DescribeServiceUpdatesPublisher;
import software.amazon.awssdk.services.elasticache.paginators.DescribeSnapshotsPublisher;
import software.amazon.awssdk.services.elasticache.paginators.DescribeUpdateActionsPublisher;
import software.amazon.awssdk.services.elasticache.transform.AddTagsToResourceRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.AuthorizeCacheSecurityGroupIngressRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.BatchApplyUpdateActionRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.BatchStopUpdateActionRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.CopySnapshotRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.CreateCacheClusterRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.CreateCacheParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.CreateCacheSecurityGroupRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.CreateCacheSubnetGroupRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.CreateReplicationGroupRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.CreateSnapshotRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DecreaseReplicaCountRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DeleteCacheClusterRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DeleteCacheParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DeleteCacheSecurityGroupRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DeleteCacheSubnetGroupRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DeleteReplicationGroupRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DeleteSnapshotRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DescribeCacheClustersRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DescribeCacheEngineVersionsRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DescribeCacheParameterGroupsRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DescribeCacheParametersRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DescribeCacheSecurityGroupsRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DescribeCacheSubnetGroupsRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DescribeEngineDefaultParametersRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DescribeEventsRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DescribeReplicationGroupsRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DescribeReservedCacheNodesOfferingsRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DescribeReservedCacheNodesRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DescribeServiceUpdatesRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DescribeSnapshotsRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.DescribeUpdateActionsRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.IncreaseReplicaCountRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.ListAllowedNodeTypeModificationsRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.ModifyCacheClusterRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.ModifyCacheParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.ModifyCacheSubnetGroupRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.ModifyReplicationGroupRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.ModifyReplicationGroupShardConfigurationRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.PurchaseReservedCacheNodesOfferingRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.RebootCacheClusterRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.RemoveTagsFromResourceRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.ResetCacheParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.RevokeCacheSecurityGroupIngressRequestMarshaller;
import software.amazon.awssdk.services.elasticache.transform.TestFailoverRequestMarshaller;
import software.amazon.awssdk.utils.CompletableFutureUtils;
/**
* Internal implementation of {@link ElastiCacheAsyncClient}.
*
* @see ElastiCacheAsyncClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultElastiCacheAsyncClient implements ElastiCacheAsyncClient {
private static final Logger log = LoggerFactory.getLogger(DefaultElastiCacheAsyncClient.class);
private final AsyncClientHandler clientHandler;
private final AwsQueryProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
protected DefaultElastiCacheAsyncClient(SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsAsyncClientHandler(clientConfiguration);
this.clientConfiguration = clientConfiguration;
this.protocolFactory = init();
}
@Override
public final String serviceName() {
return SERVICE_NAME;
}
/**
*
* Adds up to 50 cost allocation tags to the named resource. A cost allocation tag is a key-value pair where the key
* and value are case-sensitive. You can use cost allocation tags to categorize and track your AWS costs.
*
*
* When you apply tags to your ElastiCache resources, AWS generates a cost allocation report as a comma-separated
* value (CSV) file with your usage and costs aggregated by your tags. You can apply tags that represent business
* categories (such as cost centers, application names, or owners) to organize your costs across multiple services.
* For more information, see Using Cost Allocation Tags in
* Amazon ElastiCache in the ElastiCache User Guide.
*
*
* @param addTagsToResourceRequest
* Represents the input of an AddTagsToResource operation.
* @return A Java Future containing the result of the AddTagsToResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheClusterNotFoundException The requested cluster ID does not refer to an existing cluster.
* - SnapshotNotFoundException The requested snapshot name does not refer to an existing snapshot.
* - TagQuotaPerResourceExceededException The request cannot be processed because it would cause the
* resource to have more than the allowed number of tags. The maximum number of tags permitted on a resource
* is 50.
* - InvalidArnException The requested Amazon Resource Name (ARN) does not refer to an existing resource.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.AddTagsToResource
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture addTagsToResource(AddTagsToResourceRequest addTagsToResourceRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(AddTagsToResourceResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("AddTagsToResource")
.withMarshaller(new AddTagsToResourceRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(addTagsToResourceRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Allows network ingress to a cache security group. Applications using ElastiCache must be running on Amazon EC2,
* and Amazon EC2 security groups are used as the authorization mechanism.
*
*
*
* You cannot authorize ingress from an Amazon EC2 security group in one region to an ElastiCache cluster in another
* region.
*
*
*
* @param authorizeCacheSecurityGroupIngressRequest
* Represents the input of an AuthorizeCacheSecurityGroupIngress operation.
* @return A Java Future containing the result of the AuthorizeCacheSecurityGroupIngress operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheSecurityGroupNotFoundException The requested cache security group name does not refer to an
* existing cache security group.
* - InvalidCacheSecurityGroupStateException The current state of the cache security group does not allow
* deletion.
* - AuthorizationAlreadyExistsException The specified Amazon EC2 security group is already authorized for
* the specified cache security group.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.AuthorizeCacheSecurityGroupIngress
* @see AWS API Documentation
*/
@Override
public CompletableFuture authorizeCacheSecurityGroupIngress(
AuthorizeCacheSecurityGroupIngressRequest authorizeCacheSecurityGroupIngressRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(AuthorizeCacheSecurityGroupIngressResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AuthorizeCacheSecurityGroupIngress")
.withMarshaller(new AuthorizeCacheSecurityGroupIngressRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(authorizeCacheSecurityGroupIngressRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Apply the service update. For more information on service updates and applying them, see Applying Service
* Updates.
*
*
* @param batchApplyUpdateActionRequest
* @return A Java Future containing the result of the BatchApplyUpdateAction operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUpdateNotFoundException The service update doesn't exist
* - InvalidParameterValueException The value for a parameter is invalid.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.BatchApplyUpdateAction
* @see AWS API Documentation
*/
@Override
public CompletableFuture batchApplyUpdateAction(
BatchApplyUpdateActionRequest batchApplyUpdateActionRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(BatchApplyUpdateActionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("BatchApplyUpdateAction")
.withMarshaller(new BatchApplyUpdateActionRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(batchApplyUpdateActionRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Stop the service update. For more information on service updates and stopping them, see Stopping
* Service Updates.
*
*
* @param batchStopUpdateActionRequest
* @return A Java Future containing the result of the BatchStopUpdateAction operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUpdateNotFoundException The service update doesn't exist
* - InvalidParameterValueException The value for a parameter is invalid.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.BatchStopUpdateAction
* @see AWS API Documentation
*/
@Override
public CompletableFuture batchStopUpdateAction(
BatchStopUpdateActionRequest batchStopUpdateActionRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(BatchStopUpdateActionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("BatchStopUpdateAction")
.withMarshaller(new BatchStopUpdateActionRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(batchStopUpdateActionRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Makes a copy of an existing snapshot.
*
*
*
* This operation is valid for Redis only.
*
*
*
* Users or groups that have permissions to use the CopySnapshot
operation can create their own Amazon
* S3 buckets and copy snapshots to it. To control access to your snapshots, use an IAM policy to control who has
* the ability to use the CopySnapshot
operation. For more information about using IAM to control the
* use of ElastiCache operations, see Exporting Snapshots
* and Authentication & Access
* Control.
*
*
*
* You could receive the following error messages.
*
*
* Error Messages
*
*
* -
*
* Error Message: The S3 bucket %s is outside of the region.
*
*
* Solution: Create an Amazon S3 bucket in the same region as your snapshot. For more information, see Step 1: Create an Amazon S3 Bucket in the ElastiCache User Guide.
*
*
* -
*
* Error Message: The S3 bucket %s does not exist.
*
*
* Solution: Create an Amazon S3 bucket in the same region as your snapshot. For more information, see Step 1: Create an Amazon S3 Bucket in the ElastiCache User Guide.
*
*
* -
*
* Error Message: The S3 bucket %s is not owned by the authenticated user.
*
*
* Solution: Create an Amazon S3 bucket in the same region as your snapshot. For more information, see Step 1: Create an Amazon S3 Bucket in the ElastiCache User Guide.
*
*
* -
*
* Error Message: The authenticated user does not have sufficient permissions to perform the desired
* activity.
*
*
* Solution: Contact your system administrator to get the needed permissions.
*
*
* -
*
* Error Message: The S3 bucket %s already contains an object with key %s.
*
*
* Solution: Give the TargetSnapshotName
a new and unique value. If exporting a snapshot, you
* could alternatively create a new Amazon S3 bucket and use this same value for TargetSnapshotName
.
*
*
* -
*
* Error Message: ElastiCache has not been granted READ permissions %s on the S3 Bucket.
*
*
* Solution: Add List and Read permissions on the bucket. For more information, see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the ElastiCache User Guide.
*
*
* -
*
* Error Message: ElastiCache has not been granted WRITE permissions %s on the S3 Bucket.
*
*
* Solution: Add Upload/Delete permissions on the bucket. For more information, see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the ElastiCache User Guide.
*
*
* -
*
* Error Message: ElastiCache has not been granted READ_ACP permissions %s on the S3 Bucket.
*
*
* Solution: Add View Permissions on the bucket. For more information, see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the ElastiCache User Guide.
*
*
*
*
* @param copySnapshotRequest
* Represents the input of a CopySnapshotMessage
operation.
* @return A Java Future containing the result of the CopySnapshot operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SnapshotAlreadyExistsException You already have a snapshot with the given name.
* - SnapshotNotFoundException The requested snapshot name does not refer to an existing snapshot.
* - SnapshotQuotaExceededException The request cannot be processed because it would exceed the maximum
* number of snapshots.
* - InvalidSnapshotStateException The current state of the snapshot does not allow the requested
* operation to occur.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.CopySnapshot
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture copySnapshot(CopySnapshotRequest copySnapshotRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CopySnapshotResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CopySnapshot").withMarshaller(new CopySnapshotRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(copySnapshotRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a cluster. All nodes in the cluster run the same protocol-compliant cache engine software, either
* Memcached or Redis.
*
*
* This operation is not supported for Redis (cluster mode enabled) clusters.
*
*
* @param createCacheClusterRequest
* Represents the input of a CreateCacheCluster operation.
* @return A Java Future containing the result of the CreateCacheCluster operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ReplicationGroupNotFoundException The specified replication group does not exist.
* - InvalidReplicationGroupStateException The requested replication group is not in the
*
available
state.
* - CacheClusterAlreadyExistsException You already have a cluster with the given identifier.
* - InsufficientCacheClusterCapacityException The requested cache node type is not available in the
* specified Availability Zone. For more information, see InsufficientCacheClusterCapacity in the ElastiCache User Guide.
* - CacheSecurityGroupNotFoundException The requested cache security group name does not refer to an
* existing cache security group.
* - CacheSubnetGroupNotFoundException The requested cache subnet group name does not refer to an existing
* cache subnet group.
* - ClusterQuotaForCustomerExceededException The request cannot be processed because it would exceed the
* allowed number of clusters per customer.
* - NodeQuotaForClusterExceededException The request cannot be processed because it would exceed the
* allowed number of cache nodes in a single cluster.
* - NodeQuotaForCustomerExceededException The request cannot be processed because it would exceed the
* allowed number of cache nodes per customer.
* - CacheParameterGroupNotFoundException The requested cache parameter group name does not refer to an
* existing cache parameter group.
* - InvalidVpcNetworkStateException The VPC network is in an invalid state.
* - TagQuotaPerResourceExceededException The request cannot be processed because it would cause the
* resource to have more than the allowed number of tags. The maximum number of tags permitted on a resource
* is 50.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.CreateCacheCluster
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture createCacheCluster(CreateCacheClusterRequest createCacheClusterRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateCacheClusterResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateCacheCluster")
.withMarshaller(new CreateCacheClusterRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createCacheClusterRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a new Amazon ElastiCache cache parameter group. An ElastiCache cache parameter group is a collection of
* parameters and their values that are applied to all of the nodes in any cluster or replication group using the
* CacheParameterGroup.
*
*
* A newly created CacheParameterGroup is an exact duplicate of the default parameter group for the
* CacheParameterGroupFamily. To customize the newly created CacheParameterGroup you can change the values of
* specific parameters. For more information, see:
*
*
* -
*
*
* ModifyCacheParameterGroup in the ElastiCache API Reference.
*
*
* -
*
* Parameters and
* Parameter Groups in the ElastiCache User Guide.
*
*
*
*
* @param createCacheParameterGroupRequest
* Represents the input of a CreateCacheParameterGroup
operation.
* @return A Java Future containing the result of the CreateCacheParameterGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheParameterGroupQuotaExceededException The request cannot be processed because it would exceed the
* maximum number of cache security groups.
* - CacheParameterGroupAlreadyExistsException A cache parameter group with the requested name already
* exists.
* - InvalidCacheParameterGroupStateException The current state of the cache parameter group does not
* allow the requested operation to occur.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.CreateCacheParameterGroup
* @see AWS API Documentation
*/
@Override
public CompletableFuture createCacheParameterGroup(
CreateCacheParameterGroupRequest createCacheParameterGroupRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateCacheParameterGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateCacheParameterGroup")
.withMarshaller(new CreateCacheParameterGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createCacheParameterGroupRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a new cache security group. Use a cache security group to control access to one or more clusters.
*
*
* Cache security groups are only used when you are creating a cluster outside of an Amazon Virtual Private Cloud
* (Amazon VPC). If you are creating a cluster inside of a VPC, use a cache subnet group instead. For more
* information, see CreateCacheSubnetGroup.
*
*
* @param createCacheSecurityGroupRequest
* Represents the input of a CreateCacheSecurityGroup
operation.
* @return A Java Future containing the result of the CreateCacheSecurityGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheSecurityGroupAlreadyExistsException A cache security group with the specified name already
* exists.
* - CacheSecurityGroupQuotaExceededException The request cannot be processed because it would exceed the
* allowed number of cache security groups.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.CreateCacheSecurityGroup
* @see AWS API Documentation
*/
@Override
public CompletableFuture createCacheSecurityGroup(
CreateCacheSecurityGroupRequest createCacheSecurityGroupRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateCacheSecurityGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateCacheSecurityGroup")
.withMarshaller(new CreateCacheSecurityGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createCacheSecurityGroupRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a new cache subnet group.
*
*
* Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).
*
*
* @param createCacheSubnetGroupRequest
* Represents the input of a CreateCacheSubnetGroup
operation.
* @return A Java Future containing the result of the CreateCacheSubnetGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheSubnetGroupAlreadyExistsException The requested cache subnet group name is already in use by an
* existing cache subnet group.
* - CacheSubnetGroupQuotaExceededException The request cannot be processed because it would exceed the
* allowed number of cache subnet groups.
* - CacheSubnetQuotaExceededException The request cannot be processed because it would exceed the allowed
* number of subnets in a cache subnet group.
* - InvalidSubnetException An invalid subnet identifier was specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.CreateCacheSubnetGroup
* @see AWS API Documentation
*/
@Override
public CompletableFuture createCacheSubnetGroup(
CreateCacheSubnetGroupRequest createCacheSubnetGroupRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateCacheSubnetGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateCacheSubnetGroup")
.withMarshaller(new CreateCacheSubnetGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createCacheSubnetGroupRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a Redis (cluster mode disabled) or a Redis (cluster mode enabled) replication group.
*
*
* A Redis (cluster mode disabled) replication group is a collection of clusters, where one of the clusters is a
* read/write primary and the others are read-only replicas. Writes to the primary are asynchronously propagated to
* the replicas.
*
*
* A Redis (cluster mode enabled) replication group is a collection of 1 to 15 node groups (shards). Each node group
* (shard) has one read/write primary node and up to 5 read-only replica nodes. Writes to the primary are
* asynchronously propagated to the replicas. Redis (cluster mode enabled) replication groups partition the data
* across node groups (shards).
*
*
* When a Redis (cluster mode disabled) replication group has been successfully created, you can add one or more
* read replicas to it, up to a total of 5 read replicas. You cannot alter a Redis (cluster mode enabled)
* replication group after it has been created. However, if you need to increase or decrease the number of node
* groups (console: shards), you can avail yourself of ElastiCache for Redis' enhanced backup and restore. For more
* information, see Restoring From a Backup
* with Cluster Resizing in the ElastiCache User Guide.
*
*
*
* This operation is valid for Redis only.
*
*
*
* @param createReplicationGroupRequest
* Represents the input of a CreateReplicationGroup
operation.
* @return A Java Future containing the result of the CreateReplicationGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheClusterNotFoundException The requested cluster ID does not refer to an existing cluster.
* - InvalidCacheClusterStateException The requested cluster is not in the
available
state.
* - ReplicationGroupAlreadyExistsException The specified replication group already exists.
* - InsufficientCacheClusterCapacityException The requested cache node type is not available in the
* specified Availability Zone. For more information, see InsufficientCacheClusterCapacity in the ElastiCache User Guide.
* - CacheSecurityGroupNotFoundException The requested cache security group name does not refer to an
* existing cache security group.
* - CacheSubnetGroupNotFoundException The requested cache subnet group name does not refer to an existing
* cache subnet group.
* - ClusterQuotaForCustomerExceededException The request cannot be processed because it would exceed the
* allowed number of clusters per customer.
* - NodeQuotaForClusterExceededException The request cannot be processed because it would exceed the
* allowed number of cache nodes in a single cluster.
* - NodeQuotaForCustomerExceededException The request cannot be processed because it would exceed the
* allowed number of cache nodes per customer.
* - CacheParameterGroupNotFoundException The requested cache parameter group name does not refer to an
* existing cache parameter group.
* - InvalidVpcNetworkStateException The VPC network is in an invalid state.
* - TagQuotaPerResourceExceededException The request cannot be processed because it would cause the
* resource to have more than the allowed number of tags. The maximum number of tags permitted on a resource
* is 50.
* - NodeGroupsPerReplicationGroupQuotaExceededException The request cannot be processed because it would
* exceed the maximum allowed number of node groups (shards) in a single replication group. The default
* maximum is 15
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.CreateReplicationGroup
* @see AWS API Documentation
*/
@Override
public CompletableFuture createReplicationGroup(
CreateReplicationGroupRequest createReplicationGroupRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateReplicationGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateReplicationGroup")
.withMarshaller(new CreateReplicationGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createReplicationGroupRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a copy of an entire cluster or replication group at a specific moment in time.
*
*
*
* This operation is valid for Redis only.
*
*
*
* @param createSnapshotRequest
* Represents the input of a CreateSnapshot
operation.
* @return A Java Future containing the result of the CreateSnapshot operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SnapshotAlreadyExistsException You already have a snapshot with the given name.
* - CacheClusterNotFoundException The requested cluster ID does not refer to an existing cluster.
* - ReplicationGroupNotFoundException The specified replication group does not exist.
* - InvalidCacheClusterStateException The requested cluster is not in the
available
state.
* - InvalidReplicationGroupStateException The requested replication group is not in the
*
available
state.
* - SnapshotQuotaExceededException The request cannot be processed because it would exceed the maximum
* number of snapshots.
* - SnapshotFeatureNotSupportedException You attempted one of the following operations:
*
* -
*
* Creating a snapshot of a Redis cluster running on a cache.t1.micro
cache node.
*
*
* -
*
* Creating a snapshot of a cluster that is running Memcached rather than Redis.
*
*
*
*
* Neither of these are supported by ElastiCache.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - InvalidParameterValueException The value for a parameter is invalid.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.CreateSnapshot
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture createSnapshot(CreateSnapshotRequest createSnapshotRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateSnapshotResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateSnapshot").withMarshaller(new CreateSnapshotRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createSnapshotRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Dynamically decreases the number of replics in a Redis (cluster mode disabled) replication group or the number of
* replica nodes in one or more node groups (shards) of a Redis (cluster mode enabled) replication group. This
* operation is performed with no cluster down time.
*
*
* @param decreaseReplicaCountRequest
* @return A Java Future containing the result of the DecreaseReplicaCount operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ReplicationGroupNotFoundException The specified replication group does not exist.
* - InvalidReplicationGroupStateException The requested replication group is not in the
*
available
state.
* - InvalidCacheClusterStateException The requested cluster is not in the
available
state.
* - InvalidVpcNetworkStateException The VPC network is in an invalid state.
* - InsufficientCacheClusterCapacityException The requested cache node type is not available in the
* specified Availability Zone. For more information, see InsufficientCacheClusterCapacity in the ElastiCache User Guide.
* - ClusterQuotaForCustomerExceededException The request cannot be processed because it would exceed the
* allowed number of clusters per customer.
* - NodeGroupsPerReplicationGroupQuotaExceededException The request cannot be processed because it would
* exceed the maximum allowed number of node groups (shards) in a single replication group. The default
* maximum is 15
* - NodeQuotaForCustomerExceededException The request cannot be processed because it would exceed the
* allowed number of cache nodes per customer.
* - ServiceLinkedRoleNotFoundException The specified service linked role (SLR) was not found.
* - NoOperationException The operation was not performed because no changes were required.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DecreaseReplicaCount
* @see AWS API Documentation
*/
@Override
public CompletableFuture decreaseReplicaCount(
DecreaseReplicaCountRequest decreaseReplicaCountRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DecreaseReplicaCountResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DecreaseReplicaCount")
.withMarshaller(new DecreaseReplicaCountRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(decreaseReplicaCountRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a previously provisioned cluster. DeleteCacheCluster
deletes all associated cache nodes,
* node endpoints and the cluster itself. When you receive a successful response from this operation, Amazon
* ElastiCache immediately begins deleting the cluster; you cannot cancel or revert this operation.
*
*
* This operation is not valid for:
*
*
* -
*
* Redis (cluster mode enabled) clusters
*
*
* -
*
* A cluster that is the last read replica of a replication group
*
*
* -
*
* A node group (shard) that has Multi-AZ mode enabled
*
*
* -
*
* A cluster from a Redis (cluster mode enabled) replication group
*
*
* -
*
* A cluster that is not in the available
state
*
*
*
*
* @param deleteCacheClusterRequest
* Represents the input of a DeleteCacheCluster
operation.
* @return A Java Future containing the result of the DeleteCacheCluster operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheClusterNotFoundException The requested cluster ID does not refer to an existing cluster.
* - InvalidCacheClusterStateException The requested cluster is not in the
available
state.
* - SnapshotAlreadyExistsException You already have a snapshot with the given name.
* - SnapshotFeatureNotSupportedException You attempted one of the following operations:
*
* -
*
* Creating a snapshot of a Redis cluster running on a cache.t1.micro
cache node.
*
*
* -
*
* Creating a snapshot of a cluster that is running Memcached rather than Redis.
*
*
*
*
* Neither of these are supported by ElastiCache.
* - SnapshotQuotaExceededException The request cannot be processed because it would exceed the maximum
* number of snapshots.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DeleteCacheCluster
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture deleteCacheCluster(DeleteCacheClusterRequest deleteCacheClusterRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteCacheClusterResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteCacheCluster")
.withMarshaller(new DeleteCacheClusterRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteCacheClusterRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the specified cache parameter group. You cannot delete a cache parameter group if it is associated with
* any cache clusters.
*
*
* @param deleteCacheParameterGroupRequest
* Represents the input of a DeleteCacheParameterGroup
operation.
* @return A Java Future containing the result of the DeleteCacheParameterGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidCacheParameterGroupStateException The current state of the cache parameter group does not
* allow the requested operation to occur.
* - CacheParameterGroupNotFoundException The requested cache parameter group name does not refer to an
* existing cache parameter group.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DeleteCacheParameterGroup
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteCacheParameterGroup(
DeleteCacheParameterGroupRequest deleteCacheParameterGroupRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteCacheParameterGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteCacheParameterGroup")
.withMarshaller(new DeleteCacheParameterGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteCacheParameterGroupRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a cache security group.
*
*
*
* You cannot delete a cache security group if it is associated with any clusters.
*
*
*
* @param deleteCacheSecurityGroupRequest
* Represents the input of a DeleteCacheSecurityGroup
operation.
* @return A Java Future containing the result of the DeleteCacheSecurityGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidCacheSecurityGroupStateException The current state of the cache security group does not allow
* deletion.
* - CacheSecurityGroupNotFoundException The requested cache security group name does not refer to an
* existing cache security group.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DeleteCacheSecurityGroup
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteCacheSecurityGroup(
DeleteCacheSecurityGroupRequest deleteCacheSecurityGroupRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteCacheSecurityGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteCacheSecurityGroup")
.withMarshaller(new DeleteCacheSecurityGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteCacheSecurityGroupRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a cache subnet group.
*
*
*
* You cannot delete a cache subnet group if it is associated with any clusters.
*
*
*
* @param deleteCacheSubnetGroupRequest
* Represents the input of a DeleteCacheSubnetGroup
operation.
* @return A Java Future containing the result of the DeleteCacheSubnetGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheSubnetGroupInUseException The requested cache subnet group is currently in use.
* - CacheSubnetGroupNotFoundException The requested cache subnet group name does not refer to an existing
* cache subnet group.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DeleteCacheSubnetGroup
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteCacheSubnetGroup(
DeleteCacheSubnetGroupRequest deleteCacheSubnetGroupRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteCacheSubnetGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteCacheSubnetGroup")
.withMarshaller(new DeleteCacheSubnetGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteCacheSubnetGroupRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes an existing replication group. By default, this operation deletes the entire replication group, including
* the primary/primaries and all of the read replicas. If the replication group has only one primary, you can
* optionally delete only the read replicas, while retaining the primary by setting
* RetainPrimaryCluster=true
.
*
*
* When you receive a successful response from this operation, Amazon ElastiCache immediately begins deleting the
* selected resources; you cannot cancel or revert this operation.
*
*
*
* This operation is valid for Redis only.
*
*
*
* @param deleteReplicationGroupRequest
* Represents the input of a DeleteReplicationGroup
operation.
* @return A Java Future containing the result of the DeleteReplicationGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ReplicationGroupNotFoundException The specified replication group does not exist.
* - InvalidReplicationGroupStateException The requested replication group is not in the
*
available
state.
* - SnapshotAlreadyExistsException You already have a snapshot with the given name.
* - SnapshotFeatureNotSupportedException You attempted one of the following operations:
*
* -
*
* Creating a snapshot of a Redis cluster running on a cache.t1.micro
cache node.
*
*
* -
*
* Creating a snapshot of a cluster that is running Memcached rather than Redis.
*
*
*
*
* Neither of these are supported by ElastiCache.
* - SnapshotQuotaExceededException The request cannot be processed because it would exceed the maximum
* number of snapshots.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DeleteReplicationGroup
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteReplicationGroup(
DeleteReplicationGroupRequest deleteReplicationGroupRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteReplicationGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteReplicationGroup")
.withMarshaller(new DeleteReplicationGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteReplicationGroupRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes an existing snapshot. When you receive a successful response from this operation, ElastiCache immediately
* begins deleting the snapshot; you cannot cancel or revert this operation.
*
*
*
* This operation is valid for Redis only.
*
*
*
* @param deleteSnapshotRequest
* Represents the input of a DeleteSnapshot
operation.
* @return A Java Future containing the result of the DeleteSnapshot operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - SnapshotNotFoundException The requested snapshot name does not refer to an existing snapshot.
* - InvalidSnapshotStateException The current state of the snapshot does not allow the requested
* operation to occur.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DeleteSnapshot
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture deleteSnapshot(DeleteSnapshotRequest deleteSnapshotRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteSnapshotResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteSnapshot").withMarshaller(new DeleteSnapshotRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteSnapshotRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns information about all provisioned clusters if no cluster identifier is specified, or about a specific
* cache cluster if a cluster identifier is supplied.
*
*
* By default, abbreviated information about the clusters is returned. You can use the optional
* ShowCacheNodeInfo flag to retrieve detailed information about the cache nodes associated with the
* clusters. These details include the DNS address and port for the cache node endpoint.
*
*
* If the cluster is in the creating state, only cluster-level information is displayed until all of the
* nodes are successfully provisioned.
*
*
* If the cluster is in the deleting state, only cluster-level information is displayed.
*
*
* If cache nodes are currently being added to the cluster, node endpoint information and creation time for the
* additional nodes are not displayed until they are completely provisioned. When the cluster state is
* available, the cluster is ready for use.
*
*
* If cache nodes are currently being removed from the cluster, no endpoint information for the removed nodes is
* displayed.
*
*
* @param describeCacheClustersRequest
* Represents the input of a DescribeCacheClusters
operation.
* @return A Java Future containing the result of the DescribeCacheClusters operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheClusterNotFoundException The requested cluster ID does not refer to an existing cluster.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeCacheClusters
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeCacheClusters(
DescribeCacheClustersRequest describeCacheClustersRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeCacheClustersResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeCacheClusters")
.withMarshaller(new DescribeCacheClustersRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeCacheClustersRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns information about all provisioned clusters if no cluster identifier is specified, or about a specific
* cache cluster if a cluster identifier is supplied.
*
*
* By default, abbreviated information about the clusters is returned. You can use the optional
* ShowCacheNodeInfo flag to retrieve detailed information about the cache nodes associated with the
* clusters. These details include the DNS address and port for the cache node endpoint.
*
*
* If the cluster is in the creating state, only cluster-level information is displayed until all of the
* nodes are successfully provisioned.
*
*
* If the cluster is in the deleting state, only cluster-level information is displayed.
*
*
* If cache nodes are currently being added to the cluster, node endpoint information and creation time for the
* additional nodes are not displayed until they are completely provisioned. When the cluster state is
* available, the cluster is ready for use.
*
*
* If cache nodes are currently being removed from the cluster, no endpoint information for the removed nodes is
* displayed.
*
*
*
* This is a variant of
* {@link #describeCacheClusters(software.amazon.awssdk.services.elasticache.model.DescribeCacheClustersRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeCacheClustersPublisher publisher = client.describeCacheClustersPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeCacheClustersPublisher publisher = client.describeCacheClustersPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.elasticache.model.DescribeCacheClustersResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeCacheClusters(software.amazon.awssdk.services.elasticache.model.DescribeCacheClustersRequest)}
* operation.
*
*
* @param describeCacheClustersRequest
* Represents the input of a DescribeCacheClusters
operation.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheClusterNotFoundException The requested cluster ID does not refer to an existing cluster.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeCacheClusters
* @see AWS API Documentation
*/
public DescribeCacheClustersPublisher describeCacheClustersPaginator(DescribeCacheClustersRequest describeCacheClustersRequest) {
return new DescribeCacheClustersPublisher(this, applyPaginatorUserAgent(describeCacheClustersRequest));
}
/**
*
* Returns a list of the available cache engines and their versions.
*
*
* @param describeCacheEngineVersionsRequest
* Represents the input of a DescribeCacheEngineVersions
operation.
* @return A Java Future containing the result of the DescribeCacheEngineVersions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeCacheEngineVersions
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeCacheEngineVersions(
DescribeCacheEngineVersionsRequest describeCacheEngineVersionsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeCacheEngineVersionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeCacheEngineVersions")
.withMarshaller(new DescribeCacheEngineVersionsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeCacheEngineVersionsRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a list of the available cache engines and their versions.
*
*
*
* This is a variant of
* {@link #describeCacheEngineVersions(software.amazon.awssdk.services.elasticache.model.DescribeCacheEngineVersionsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeCacheEngineVersionsPublisher publisher = client.describeCacheEngineVersionsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeCacheEngineVersionsPublisher publisher = client.describeCacheEngineVersionsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.elasticache.model.DescribeCacheEngineVersionsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeCacheEngineVersions(software.amazon.awssdk.services.elasticache.model.DescribeCacheEngineVersionsRequest)}
* operation.
*
*
* @param describeCacheEngineVersionsRequest
* Represents the input of a DescribeCacheEngineVersions
operation.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeCacheEngineVersions
* @see AWS API Documentation
*/
public DescribeCacheEngineVersionsPublisher describeCacheEngineVersionsPaginator(
DescribeCacheEngineVersionsRequest describeCacheEngineVersionsRequest) {
return new DescribeCacheEngineVersionsPublisher(this, applyPaginatorUserAgent(describeCacheEngineVersionsRequest));
}
/**
*
* Returns a list of cache parameter group descriptions. If a cache parameter group name is specified, the list
* contains only the descriptions for that group.
*
*
* @param describeCacheParameterGroupsRequest
* Represents the input of a DescribeCacheParameterGroups
operation.
* @return A Java Future containing the result of the DescribeCacheParameterGroups operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheParameterGroupNotFoundException The requested cache parameter group name does not refer to an
* existing cache parameter group.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeCacheParameterGroups
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeCacheParameterGroups(
DescribeCacheParameterGroupsRequest describeCacheParameterGroupsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeCacheParameterGroupsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeCacheParameterGroups")
.withMarshaller(new DescribeCacheParameterGroupsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeCacheParameterGroupsRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a list of cache parameter group descriptions. If a cache parameter group name is specified, the list
* contains only the descriptions for that group.
*
*
*
* This is a variant of
* {@link #describeCacheParameterGroups(software.amazon.awssdk.services.elasticache.model.DescribeCacheParameterGroupsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeCacheParameterGroupsPublisher publisher = client.describeCacheParameterGroupsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeCacheParameterGroupsPublisher publisher = client.describeCacheParameterGroupsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.elasticache.model.DescribeCacheParameterGroupsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeCacheParameterGroups(software.amazon.awssdk.services.elasticache.model.DescribeCacheParameterGroupsRequest)}
* operation.
*
*
* @param describeCacheParameterGroupsRequest
* Represents the input of a DescribeCacheParameterGroups
operation.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheParameterGroupNotFoundException The requested cache parameter group name does not refer to an
* existing cache parameter group.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeCacheParameterGroups
* @see AWS API Documentation
*/
public DescribeCacheParameterGroupsPublisher describeCacheParameterGroupsPaginator(
DescribeCacheParameterGroupsRequest describeCacheParameterGroupsRequest) {
return new DescribeCacheParameterGroupsPublisher(this, applyPaginatorUserAgent(describeCacheParameterGroupsRequest));
}
/**
*
* Returns the detailed parameter list for a particular cache parameter group.
*
*
* @param describeCacheParametersRequest
* Represents the input of a DescribeCacheParameters
operation.
* @return A Java Future containing the result of the DescribeCacheParameters operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheParameterGroupNotFoundException The requested cache parameter group name does not refer to an
* existing cache parameter group.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeCacheParameters
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeCacheParameters(
DescribeCacheParametersRequest describeCacheParametersRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeCacheParametersResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeCacheParameters")
.withMarshaller(new DescribeCacheParametersRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeCacheParametersRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the detailed parameter list for a particular cache parameter group.
*
*
*
* This is a variant of
* {@link #describeCacheParameters(software.amazon.awssdk.services.elasticache.model.DescribeCacheParametersRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeCacheParametersPublisher publisher = client.describeCacheParametersPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeCacheParametersPublisher publisher = client.describeCacheParametersPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.elasticache.model.DescribeCacheParametersResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeCacheParameters(software.amazon.awssdk.services.elasticache.model.DescribeCacheParametersRequest)}
* operation.
*
*
* @param describeCacheParametersRequest
* Represents the input of a DescribeCacheParameters
operation.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheParameterGroupNotFoundException The requested cache parameter group name does not refer to an
* existing cache parameter group.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeCacheParameters
* @see AWS API Documentation
*/
public DescribeCacheParametersPublisher describeCacheParametersPaginator(
DescribeCacheParametersRequest describeCacheParametersRequest) {
return new DescribeCacheParametersPublisher(this, applyPaginatorUserAgent(describeCacheParametersRequest));
}
/**
*
* Returns a list of cache security group descriptions. If a cache security group name is specified, the list
* contains only the description of that group. This applicable only when you have ElastiCache in Classic setup
*
*
* @param describeCacheSecurityGroupsRequest
* Represents the input of a DescribeCacheSecurityGroups
operation.
* @return A Java Future containing the result of the DescribeCacheSecurityGroups operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheSecurityGroupNotFoundException The requested cache security group name does not refer to an
* existing cache security group.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeCacheSecurityGroups
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeCacheSecurityGroups(
DescribeCacheSecurityGroupsRequest describeCacheSecurityGroupsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeCacheSecurityGroupsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeCacheSecurityGroups")
.withMarshaller(new DescribeCacheSecurityGroupsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeCacheSecurityGroupsRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a list of cache security group descriptions. If a cache security group name is specified, the list
* contains only the description of that group. This applicable only when you have ElastiCache in Classic setup
*
*
*
* This is a variant of
* {@link #describeCacheSecurityGroups(software.amazon.awssdk.services.elasticache.model.DescribeCacheSecurityGroupsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeCacheSecurityGroupsPublisher publisher = client.describeCacheSecurityGroupsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeCacheSecurityGroupsPublisher publisher = client.describeCacheSecurityGroupsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.elasticache.model.DescribeCacheSecurityGroupsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeCacheSecurityGroups(software.amazon.awssdk.services.elasticache.model.DescribeCacheSecurityGroupsRequest)}
* operation.
*
*
* @param describeCacheSecurityGroupsRequest
* Represents the input of a DescribeCacheSecurityGroups
operation.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheSecurityGroupNotFoundException The requested cache security group name does not refer to an
* existing cache security group.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeCacheSecurityGroups
* @see AWS API Documentation
*/
public DescribeCacheSecurityGroupsPublisher describeCacheSecurityGroupsPaginator(
DescribeCacheSecurityGroupsRequest describeCacheSecurityGroupsRequest) {
return new DescribeCacheSecurityGroupsPublisher(this, applyPaginatorUserAgent(describeCacheSecurityGroupsRequest));
}
/**
*
* Returns a list of cache subnet group descriptions. If a subnet group name is specified, the list contains only
* the description of that group. This is applicable only when you have ElastiCache in VPC setup. All ElastiCache
* clusters now launch in VPC by default.
*
*
* @param describeCacheSubnetGroupsRequest
* Represents the input of a DescribeCacheSubnetGroups
operation.
* @return A Java Future containing the result of the DescribeCacheSubnetGroups operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheSubnetGroupNotFoundException The requested cache subnet group name does not refer to an existing
* cache subnet group.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeCacheSubnetGroups
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeCacheSubnetGroups(
DescribeCacheSubnetGroupsRequest describeCacheSubnetGroupsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeCacheSubnetGroupsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeCacheSubnetGroups")
.withMarshaller(new DescribeCacheSubnetGroupsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeCacheSubnetGroupsRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a list of cache subnet group descriptions. If a subnet group name is specified, the list contains only
* the description of that group. This is applicable only when you have ElastiCache in VPC setup. All ElastiCache
* clusters now launch in VPC by default.
*
*
*
* This is a variant of
* {@link #describeCacheSubnetGroups(software.amazon.awssdk.services.elasticache.model.DescribeCacheSubnetGroupsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeCacheSubnetGroupsPublisher publisher = client.describeCacheSubnetGroupsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeCacheSubnetGroupsPublisher publisher = client.describeCacheSubnetGroupsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.elasticache.model.DescribeCacheSubnetGroupsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeCacheSubnetGroups(software.amazon.awssdk.services.elasticache.model.DescribeCacheSubnetGroupsRequest)}
* operation.
*
*
* @param describeCacheSubnetGroupsRequest
* Represents the input of a DescribeCacheSubnetGroups
operation.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheSubnetGroupNotFoundException The requested cache subnet group name does not refer to an existing
* cache subnet group.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeCacheSubnetGroups
* @see AWS API Documentation
*/
public DescribeCacheSubnetGroupsPublisher describeCacheSubnetGroupsPaginator(
DescribeCacheSubnetGroupsRequest describeCacheSubnetGroupsRequest) {
return new DescribeCacheSubnetGroupsPublisher(this, applyPaginatorUserAgent(describeCacheSubnetGroupsRequest));
}
/**
*
* Returns the default engine and system parameter information for the specified cache engine.
*
*
* @param describeEngineDefaultParametersRequest
* Represents the input of a DescribeEngineDefaultParameters
operation.
* @return A Java Future containing the result of the DescribeEngineDefaultParameters operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeEngineDefaultParameters
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeEngineDefaultParameters(
DescribeEngineDefaultParametersRequest describeEngineDefaultParametersRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeEngineDefaultParametersResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeEngineDefaultParameters")
.withMarshaller(new DescribeEngineDefaultParametersRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeEngineDefaultParametersRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the default engine and system parameter information for the specified cache engine.
*
*
*
* This is a variant of
* {@link #describeEngineDefaultParameters(software.amazon.awssdk.services.elasticache.model.DescribeEngineDefaultParametersRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeEngineDefaultParametersPublisher publisher = client.describeEngineDefaultParametersPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeEngineDefaultParametersPublisher publisher = client.describeEngineDefaultParametersPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.elasticache.model.DescribeEngineDefaultParametersResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeEngineDefaultParameters(software.amazon.awssdk.services.elasticache.model.DescribeEngineDefaultParametersRequest)}
* operation.
*
*
* @param describeEngineDefaultParametersRequest
* Represents the input of a DescribeEngineDefaultParameters
operation.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeEngineDefaultParameters
* @see AWS API Documentation
*/
public DescribeEngineDefaultParametersPublisher describeEngineDefaultParametersPaginator(
DescribeEngineDefaultParametersRequest describeEngineDefaultParametersRequest) {
return new DescribeEngineDefaultParametersPublisher(this, applyPaginatorUserAgent(describeEngineDefaultParametersRequest));
}
/**
*
* Returns events related to clusters, cache security groups, and cache parameter groups. You can obtain events
* specific to a particular cluster, cache security group, or cache parameter group by providing the name as a
* parameter.
*
*
* By default, only the events occurring within the last hour are returned; however, you can retrieve up to 14 days'
* worth of events if necessary.
*
*
* @param describeEventsRequest
* Represents the input of a DescribeEvents
operation.
* @return A Java Future containing the result of the DescribeEvents operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeEvents
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture describeEvents(DescribeEventsRequest describeEventsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeEventsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeEvents").withMarshaller(new DescribeEventsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeEventsRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns events related to clusters, cache security groups, and cache parameter groups. You can obtain events
* specific to a particular cluster, cache security group, or cache parameter group by providing the name as a
* parameter.
*
*
* By default, only the events occurring within the last hour are returned; however, you can retrieve up to 14 days'
* worth of events if necessary.
*
*
*
* This is a variant of
* {@link #describeEvents(software.amazon.awssdk.services.elasticache.model.DescribeEventsRequest)} operation. The
* return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
* internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeEventsPublisher publisher = client.describeEventsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeEventsPublisher publisher = client.describeEventsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.elasticache.model.DescribeEventsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeEvents(software.amazon.awssdk.services.elasticache.model.DescribeEventsRequest)} operation.
*
*
* @param describeEventsRequest
* Represents the input of a DescribeEvents
operation.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeEvents
* @see AWS API
* Documentation
*/
public DescribeEventsPublisher describeEventsPaginator(DescribeEventsRequest describeEventsRequest) {
return new DescribeEventsPublisher(this, applyPaginatorUserAgent(describeEventsRequest));
}
/**
*
* Returns information about a particular replication group. If no identifier is specified,
* DescribeReplicationGroups
returns information about all replication groups.
*
*
*
* This operation is valid for Redis only.
*
*
*
* @param describeReplicationGroupsRequest
* Represents the input of a DescribeReplicationGroups
operation.
* @return A Java Future containing the result of the DescribeReplicationGroups operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ReplicationGroupNotFoundException The specified replication group does not exist.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeReplicationGroups
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeReplicationGroups(
DescribeReplicationGroupsRequest describeReplicationGroupsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeReplicationGroupsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeReplicationGroups")
.withMarshaller(new DescribeReplicationGroupsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeReplicationGroupsRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns information about a particular replication group. If no identifier is specified,
* DescribeReplicationGroups
returns information about all replication groups.
*
*
*
* This operation is valid for Redis only.
*
*
*
* This is a variant of
* {@link #describeReplicationGroups(software.amazon.awssdk.services.elasticache.model.DescribeReplicationGroupsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeReplicationGroupsPublisher publisher = client.describeReplicationGroupsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeReplicationGroupsPublisher publisher = client.describeReplicationGroupsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.elasticache.model.DescribeReplicationGroupsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeReplicationGroups(software.amazon.awssdk.services.elasticache.model.DescribeReplicationGroupsRequest)}
* operation.
*
*
* @param describeReplicationGroupsRequest
* Represents the input of a DescribeReplicationGroups
operation.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ReplicationGroupNotFoundException The specified replication group does not exist.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeReplicationGroups
* @see AWS API Documentation
*/
public DescribeReplicationGroupsPublisher describeReplicationGroupsPaginator(
DescribeReplicationGroupsRequest describeReplicationGroupsRequest) {
return new DescribeReplicationGroupsPublisher(this, applyPaginatorUserAgent(describeReplicationGroupsRequest));
}
/**
*
* Returns information about reserved cache nodes for this account, or about a specified reserved cache node.
*
*
* @param describeReservedCacheNodesRequest
* Represents the input of a DescribeReservedCacheNodes
operation.
* @return A Java Future containing the result of the DescribeReservedCacheNodes operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ReservedCacheNodeNotFoundException The requested reserved cache node was not found.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeReservedCacheNodes
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeReservedCacheNodes(
DescribeReservedCacheNodesRequest describeReservedCacheNodesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeReservedCacheNodesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeReservedCacheNodes")
.withMarshaller(new DescribeReservedCacheNodesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeReservedCacheNodesRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Lists available reserved cache node offerings.
*
*
* @param describeReservedCacheNodesOfferingsRequest
* Represents the input of a DescribeReservedCacheNodesOfferings
operation.
* @return A Java Future containing the result of the DescribeReservedCacheNodesOfferings operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ReservedCacheNodesOfferingNotFoundException The requested cache node offering does not exist.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeReservedCacheNodesOfferings
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeReservedCacheNodesOfferings(
DescribeReservedCacheNodesOfferingsRequest describeReservedCacheNodesOfferingsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeReservedCacheNodesOfferingsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeReservedCacheNodesOfferings")
.withMarshaller(new DescribeReservedCacheNodesOfferingsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeReservedCacheNodesOfferingsRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Lists available reserved cache node offerings.
*
*
*
* This is a variant of
* {@link #describeReservedCacheNodesOfferings(software.amazon.awssdk.services.elasticache.model.DescribeReservedCacheNodesOfferingsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeReservedCacheNodesOfferingsPublisher publisher = client.describeReservedCacheNodesOfferingsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeReservedCacheNodesOfferingsPublisher publisher = client.describeReservedCacheNodesOfferingsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.elasticache.model.DescribeReservedCacheNodesOfferingsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeReservedCacheNodesOfferings(software.amazon.awssdk.services.elasticache.model.DescribeReservedCacheNodesOfferingsRequest)}
* operation.
*
*
* @param describeReservedCacheNodesOfferingsRequest
* Represents the input of a DescribeReservedCacheNodesOfferings
operation.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ReservedCacheNodesOfferingNotFoundException The requested cache node offering does not exist.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeReservedCacheNodesOfferings
* @see AWS API Documentation
*/
public DescribeReservedCacheNodesOfferingsPublisher describeReservedCacheNodesOfferingsPaginator(
DescribeReservedCacheNodesOfferingsRequest describeReservedCacheNodesOfferingsRequest) {
return new DescribeReservedCacheNodesOfferingsPublisher(this,
applyPaginatorUserAgent(describeReservedCacheNodesOfferingsRequest));
}
/**
*
* Returns information about reserved cache nodes for this account, or about a specified reserved cache node.
*
*
*
* This is a variant of
* {@link #describeReservedCacheNodes(software.amazon.awssdk.services.elasticache.model.DescribeReservedCacheNodesRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeReservedCacheNodesPublisher publisher = client.describeReservedCacheNodesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeReservedCacheNodesPublisher publisher = client.describeReservedCacheNodesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.elasticache.model.DescribeReservedCacheNodesResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeReservedCacheNodes(software.amazon.awssdk.services.elasticache.model.DescribeReservedCacheNodesRequest)}
* operation.
*
*
* @param describeReservedCacheNodesRequest
* Represents the input of a DescribeReservedCacheNodes
operation.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ReservedCacheNodeNotFoundException The requested reserved cache node was not found.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeReservedCacheNodes
* @see AWS API Documentation
*/
public DescribeReservedCacheNodesPublisher describeReservedCacheNodesPaginator(
DescribeReservedCacheNodesRequest describeReservedCacheNodesRequest) {
return new DescribeReservedCacheNodesPublisher(this, applyPaginatorUserAgent(describeReservedCacheNodesRequest));
}
/**
*
* Returns details of the service updates
*
*
* @param describeServiceUpdatesRequest
* @return A Java Future containing the result of the DescribeServiceUpdates operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUpdateNotFoundException The service update doesn't exist
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeServiceUpdates
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeServiceUpdates(
DescribeServiceUpdatesRequest describeServiceUpdatesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeServiceUpdatesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeServiceUpdates")
.withMarshaller(new DescribeServiceUpdatesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeServiceUpdatesRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns details of the service updates
*
*
*
* This is a variant of
* {@link #describeServiceUpdates(software.amazon.awssdk.services.elasticache.model.DescribeServiceUpdatesRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeServiceUpdatesPublisher publisher = client.describeServiceUpdatesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeServiceUpdatesPublisher publisher = client.describeServiceUpdatesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.elasticache.model.DescribeServiceUpdatesResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeServiceUpdates(software.amazon.awssdk.services.elasticache.model.DescribeServiceUpdatesRequest)}
* operation.
*
*
* @param describeServiceUpdatesRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUpdateNotFoundException The service update doesn't exist
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeServiceUpdates
* @see AWS API Documentation
*/
public DescribeServiceUpdatesPublisher describeServiceUpdatesPaginator(
DescribeServiceUpdatesRequest describeServiceUpdatesRequest) {
return new DescribeServiceUpdatesPublisher(this, applyPaginatorUserAgent(describeServiceUpdatesRequest));
}
/**
*
* Returns information about cluster or replication group snapshots. By default, DescribeSnapshots
* lists all of your snapshots; it can optionally describe a single snapshot, or just the snapshots associated with
* a particular cache cluster.
*
*
*
* This operation is valid for Redis only.
*
*
*
* @param describeSnapshotsRequest
* Represents the input of a DescribeSnapshotsMessage
operation.
* @return A Java Future containing the result of the DescribeSnapshots operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheClusterNotFoundException The requested cluster ID does not refer to an existing cluster.
* - SnapshotNotFoundException The requested snapshot name does not refer to an existing snapshot.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeSnapshots
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture describeSnapshots(DescribeSnapshotsRequest describeSnapshotsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeSnapshotsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeSnapshots")
.withMarshaller(new DescribeSnapshotsRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(describeSnapshotsRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns information about cluster or replication group snapshots. By default, DescribeSnapshots
* lists all of your snapshots; it can optionally describe a single snapshot, or just the snapshots associated with
* a particular cache cluster.
*
*
*
* This operation is valid for Redis only.
*
*
*
* This is a variant of
* {@link #describeSnapshots(software.amazon.awssdk.services.elasticache.model.DescribeSnapshotsRequest)} operation.
* The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
* internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeSnapshotsPublisher publisher = client.describeSnapshotsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeSnapshotsPublisher publisher = client.describeSnapshotsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.elasticache.model.DescribeSnapshotsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeSnapshots(software.amazon.awssdk.services.elasticache.model.DescribeSnapshotsRequest)}
* operation.
*
*
* @param describeSnapshotsRequest
* Represents the input of a DescribeSnapshotsMessage
operation.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheClusterNotFoundException The requested cluster ID does not refer to an existing cluster.
* - SnapshotNotFoundException The requested snapshot name does not refer to an existing snapshot.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeSnapshots
* @see AWS
* API Documentation
*/
public DescribeSnapshotsPublisher describeSnapshotsPaginator(DescribeSnapshotsRequest describeSnapshotsRequest) {
return new DescribeSnapshotsPublisher(this, applyPaginatorUserAgent(describeSnapshotsRequest));
}
/**
*
* Returns details of the update actions
*
*
* @param describeUpdateActionsRequest
* @return A Java Future containing the result of the DescribeUpdateActions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeUpdateActions
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeUpdateActions(
DescribeUpdateActionsRequest describeUpdateActionsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeUpdateActionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeUpdateActions")
.withMarshaller(new DescribeUpdateActionsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeUpdateActionsRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns details of the update actions
*
*
*
* This is a variant of
* {@link #describeUpdateActions(software.amazon.awssdk.services.elasticache.model.DescribeUpdateActionsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeUpdateActionsPublisher publisher = client.describeUpdateActionsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.elasticache.paginators.DescribeUpdateActionsPublisher publisher = client.describeUpdateActionsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.elasticache.model.DescribeUpdateActionsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Note: If you prefer to have control on service calls, use the
* {@link #describeUpdateActions(software.amazon.awssdk.services.elasticache.model.DescribeUpdateActionsRequest)}
* operation.
*
*
* @param describeUpdateActionsRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.DescribeUpdateActions
* @see AWS API Documentation
*/
public DescribeUpdateActionsPublisher describeUpdateActionsPaginator(DescribeUpdateActionsRequest describeUpdateActionsRequest) {
return new DescribeUpdateActionsPublisher(this, applyPaginatorUserAgent(describeUpdateActionsRequest));
}
/**
*
* Dynamically increases the number of replics in a Redis (cluster mode disabled) replication group or the number of
* replica nodes in one or more node groups (shards) of a Redis (cluster mode enabled) replication group. This
* operation is performed with no cluster down time.
*
*
* @param increaseReplicaCountRequest
* @return A Java Future containing the result of the IncreaseReplicaCount operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ReplicationGroupNotFoundException The specified replication group does not exist.
* - InvalidReplicationGroupStateException The requested replication group is not in the
*
available
state.
* - InvalidCacheClusterStateException The requested cluster is not in the
available
state.
* - InvalidVpcNetworkStateException The VPC network is in an invalid state.
* - InsufficientCacheClusterCapacityException The requested cache node type is not available in the
* specified Availability Zone. For more information, see InsufficientCacheClusterCapacity in the ElastiCache User Guide.
* - ClusterQuotaForCustomerExceededException The request cannot be processed because it would exceed the
* allowed number of clusters per customer.
* - NodeGroupsPerReplicationGroupQuotaExceededException The request cannot be processed because it would
* exceed the maximum allowed number of node groups (shards) in a single replication group. The default
* maximum is 15
* - NodeQuotaForCustomerExceededException The request cannot be processed because it would exceed the
* allowed number of cache nodes per customer.
* - NoOperationException The operation was not performed because no changes were required.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.IncreaseReplicaCount
* @see AWS API Documentation
*/
@Override
public CompletableFuture increaseReplicaCount(
IncreaseReplicaCountRequest increaseReplicaCountRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(IncreaseReplicaCountResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("IncreaseReplicaCount")
.withMarshaller(new IncreaseReplicaCountRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(increaseReplicaCountRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Lists all available node types that you can scale your Redis cluster's or replication group's current node type
* up to.
*
*
* When you use the ModifyCacheCluster
or ModifyReplicationGroup
operations to scale up
* your cluster or replication group, the value of the CacheNodeType
parameter must be one of the node
* types returned by this operation.
*
*
* @param listAllowedNodeTypeModificationsRequest
* The input parameters for the ListAllowedNodeTypeModifications
operation.
* @return A Java Future containing the result of the ListAllowedNodeTypeModifications operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheClusterNotFoundException The requested cluster ID does not refer to an existing cluster.
* - ReplicationGroupNotFoundException The specified replication group does not exist.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - InvalidParameterValueException The value for a parameter is invalid.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.ListAllowedNodeTypeModifications
* @see AWS API Documentation
*/
@Override
public CompletableFuture listAllowedNodeTypeModifications(
ListAllowedNodeTypeModificationsRequest listAllowedNodeTypeModificationsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListAllowedNodeTypeModificationsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListAllowedNodeTypeModifications")
.withMarshaller(new ListAllowedNodeTypeModificationsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listAllowedNodeTypeModificationsRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Lists all cost allocation tags currently on the named resource. A cost allocation tag
is a key-value
* pair where the key is case-sensitive and the value is optional. You can use cost allocation tags to categorize
* and track your AWS costs.
*
*
* If the cluster is not in the available state, ListTagsForResource
returns an error.
*
*
* You can have a maximum of 50 cost allocation tags on an ElastiCache resource. For more information, see Monitoring Costs with Tags.
*
*
* @param listTagsForResourceRequest
* The input parameters for the ListTagsForResource
operation.
* @return A Java Future containing the result of the ListTagsForResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheClusterNotFoundException The requested cluster ID does not refer to an existing cluster.
* - SnapshotNotFoundException The requested snapshot name does not refer to an existing snapshot.
* - InvalidArnException The requested Amazon Resource Name (ARN) does not refer to an existing resource.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.ListTagsForResource
* @see AWS API Documentation
*/
@Override
public CompletableFuture listTagsForResource(
ListTagsForResourceRequest listTagsForResourceRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListTagsForResourceResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListTagsForResource")
.withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listTagsForResourceRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Modifies the settings for a cluster. You can use this operation to change one or more cluster configuration
* parameters by specifying the parameters and the new values.
*
*
* @param modifyCacheClusterRequest
* Represents the input of a ModifyCacheCluster
operation.
* @return A Java Future containing the result of the ModifyCacheCluster operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidCacheClusterStateException The requested cluster is not in the
available
state.
* - InvalidCacheSecurityGroupStateException The current state of the cache security group does not allow
* deletion.
* - InsufficientCacheClusterCapacityException The requested cache node type is not available in the
* specified Availability Zone. For more information, see InsufficientCacheClusterCapacity in the ElastiCache User Guide.
* - CacheClusterNotFoundException The requested cluster ID does not refer to an existing cluster.
* - NodeQuotaForClusterExceededException The request cannot be processed because it would exceed the
* allowed number of cache nodes in a single cluster.
* - NodeQuotaForCustomerExceededException The request cannot be processed because it would exceed the
* allowed number of cache nodes per customer.
* - CacheSecurityGroupNotFoundException The requested cache security group name does not refer to an
* existing cache security group.
* - CacheParameterGroupNotFoundException The requested cache parameter group name does not refer to an
* existing cache parameter group.
* - InvalidVpcNetworkStateException The VPC network is in an invalid state.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.ModifyCacheCluster
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture modifyCacheCluster(ModifyCacheClusterRequest modifyCacheClusterRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ModifyCacheClusterResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ModifyCacheCluster")
.withMarshaller(new ModifyCacheClusterRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(modifyCacheClusterRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Modifies the parameters of a cache parameter group. You can modify up to 20 parameters in a single request by
* submitting a list parameter name and value pairs.
*
*
* @param modifyCacheParameterGroupRequest
* Represents the input of a ModifyCacheParameterGroup
operation.
* @return A Java Future containing the result of the ModifyCacheParameterGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheParameterGroupNotFoundException The requested cache parameter group name does not refer to an
* existing cache parameter group.
* - InvalidCacheParameterGroupStateException The current state of the cache parameter group does not
* allow the requested operation to occur.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.ModifyCacheParameterGroup
* @see AWS API Documentation
*/
@Override
public CompletableFuture modifyCacheParameterGroup(
ModifyCacheParameterGroupRequest modifyCacheParameterGroupRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ModifyCacheParameterGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ModifyCacheParameterGroup")
.withMarshaller(new ModifyCacheParameterGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(modifyCacheParameterGroupRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Modifies an existing cache subnet group.
*
*
* @param modifyCacheSubnetGroupRequest
* Represents the input of a ModifyCacheSubnetGroup
operation.
* @return A Java Future containing the result of the ModifyCacheSubnetGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheSubnetGroupNotFoundException The requested cache subnet group name does not refer to an existing
* cache subnet group.
* - CacheSubnetQuotaExceededException The request cannot be processed because it would exceed the allowed
* number of subnets in a cache subnet group.
* - SubnetInUseException The requested subnet is being used by another cache subnet group.
* - InvalidSubnetException An invalid subnet identifier was specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.ModifyCacheSubnetGroup
* @see AWS API Documentation
*/
@Override
public CompletableFuture modifyCacheSubnetGroup(
ModifyCacheSubnetGroupRequest modifyCacheSubnetGroupRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ModifyCacheSubnetGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ModifyCacheSubnetGroup")
.withMarshaller(new ModifyCacheSubnetGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(modifyCacheSubnetGroupRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Modifies the settings for a replication group.
*
*
* For Redis (cluster mode enabled) clusters, this operation cannot be used to change a cluster's node type or
* engine version. For more information, see:
*
*
* -
*
*
* Scaling for Amazon ElastiCache for Redis (cluster mode enabled) in the ElastiCache User Guide
*
*
* -
*
* ModifyReplicationGroupShardConfiguration in the ElastiCache API Reference
*
*
*
*
*
* This operation is valid for Redis only.
*
*
*
* @param modifyReplicationGroupRequest
* Represents the input of a ModifyReplicationGroups
operation.
* @return A Java Future containing the result of the ModifyReplicationGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ReplicationGroupNotFoundException The specified replication group does not exist.
* - InvalidReplicationGroupStateException The requested replication group is not in the
*
available
state.
* - InvalidCacheClusterStateException The requested cluster is not in the
available
state.
* - InvalidCacheSecurityGroupStateException The current state of the cache security group does not allow
* deletion.
* - InsufficientCacheClusterCapacityException The requested cache node type is not available in the
* specified Availability Zone. For more information, see InsufficientCacheClusterCapacity in the ElastiCache User Guide.
* - CacheClusterNotFoundException The requested cluster ID does not refer to an existing cluster.
* - NodeQuotaForClusterExceededException The request cannot be processed because it would exceed the
* allowed number of cache nodes in a single cluster.
* - NodeQuotaForCustomerExceededException The request cannot be processed because it would exceed the
* allowed number of cache nodes per customer.
* - CacheSecurityGroupNotFoundException The requested cache security group name does not refer to an
* existing cache security group.
* - CacheParameterGroupNotFoundException The requested cache parameter group name does not refer to an
* existing cache parameter group.
* - InvalidVpcNetworkStateException The VPC network is in an invalid state.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.ModifyReplicationGroup
* @see AWS API Documentation
*/
@Override
public CompletableFuture modifyReplicationGroup(
ModifyReplicationGroupRequest modifyReplicationGroupRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ModifyReplicationGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ModifyReplicationGroup")
.withMarshaller(new ModifyReplicationGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(modifyReplicationGroupRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Modifies a replication group's shards (node groups) by allowing you to add shards, remove shards, or rebalance
* the keyspaces among exisiting shards.
*
*
* @param modifyReplicationGroupShardConfigurationRequest
* Represents the input for a ModifyReplicationGroupShardConfiguration
operation.
* @return A Java Future containing the result of the ModifyReplicationGroupShardConfiguration operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ReplicationGroupNotFoundException The specified replication group does not exist.
* - InvalidReplicationGroupStateException The requested replication group is not in the
*
available
state.
* - InvalidCacheClusterStateException The requested cluster is not in the
available
state.
* - InvalidVpcNetworkStateException The VPC network is in an invalid state.
* - InsufficientCacheClusterCapacityException The requested cache node type is not available in the
* specified Availability Zone. For more information, see InsufficientCacheClusterCapacity in the ElastiCache User Guide.
* - NodeGroupsPerReplicationGroupQuotaExceededException The request cannot be processed because it would
* exceed the maximum allowed number of node groups (shards) in a single replication group. The default
* maximum is 15
* - NodeQuotaForCustomerExceededException The request cannot be processed because it would exceed the
* allowed number of cache nodes per customer.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.ModifyReplicationGroupShardConfiguration
* @see AWS API Documentation
*/
@Override
public CompletableFuture modifyReplicationGroupShardConfiguration(
ModifyReplicationGroupShardConfigurationRequest modifyReplicationGroupShardConfigurationRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ModifyReplicationGroupShardConfigurationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ModifyReplicationGroupShardConfiguration")
.withMarshaller(new ModifyReplicationGroupShardConfigurationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(modifyReplicationGroupShardConfigurationRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Allows you to purchase a reserved cache node offering.
*
*
* @param purchaseReservedCacheNodesOfferingRequest
* Represents the input of a PurchaseReservedCacheNodesOffering
operation.
* @return A Java Future containing the result of the PurchaseReservedCacheNodesOffering operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ReservedCacheNodesOfferingNotFoundException The requested cache node offering does not exist.
* - ReservedCacheNodeAlreadyExistsException You already have a reservation with the given identifier.
* - ReservedCacheNodeQuotaExceededException The request cannot be processed because it would exceed the
* user's cache node quota.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.PurchaseReservedCacheNodesOffering
* @see AWS API Documentation
*/
@Override
public CompletableFuture purchaseReservedCacheNodesOffering(
PurchaseReservedCacheNodesOfferingRequest purchaseReservedCacheNodesOfferingRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(PurchaseReservedCacheNodesOfferingResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("PurchaseReservedCacheNodesOffering")
.withMarshaller(new PurchaseReservedCacheNodesOfferingRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(purchaseReservedCacheNodesOfferingRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Reboots some, or all, of the cache nodes within a provisioned cluster. This operation applies any modified cache
* parameter groups to the cluster. The reboot operation takes place as soon as possible, and results in a momentary
* outage to the cluster. During the reboot, the cluster status is set to REBOOTING.
*
*
* The reboot causes the contents of the cache (for each cache node being rebooted) to be lost.
*
*
* When the reboot is complete, a cluster event is created.
*
*
* Rebooting a cluster is currently supported on Memcached and Redis (cluster mode disabled) clusters. Rebooting is
* not supported on Redis (cluster mode enabled) clusters.
*
*
* If you make changes to parameters that require a Redis (cluster mode enabled) cluster reboot for the changes to
* be applied, see Rebooting a Cluster
* for an alternate process.
*
*
* @param rebootCacheClusterRequest
* Represents the input of a RebootCacheCluster
operation.
* @return A Java Future containing the result of the RebootCacheCluster operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidCacheClusterStateException The requested cluster is not in the
available
state.
* - CacheClusterNotFoundException The requested cluster ID does not refer to an existing cluster.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.RebootCacheCluster
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture rebootCacheCluster(RebootCacheClusterRequest rebootCacheClusterRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(RebootCacheClusterResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("RebootCacheCluster")
.withMarshaller(new RebootCacheClusterRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(rebootCacheClusterRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Removes the tags identified by the TagKeys
list from the named resource.
*
*
* @param removeTagsFromResourceRequest
* Represents the input of a RemoveTagsFromResource
operation.
* @return A Java Future containing the result of the RemoveTagsFromResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheClusterNotFoundException The requested cluster ID does not refer to an existing cluster.
* - SnapshotNotFoundException The requested snapshot name does not refer to an existing snapshot.
* - InvalidArnException The requested Amazon Resource Name (ARN) does not refer to an existing resource.
* - TagNotFoundException The requested tag was not found on this resource.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.RemoveTagsFromResource
* @see AWS API Documentation
*/
@Override
public CompletableFuture removeTagsFromResource(
RemoveTagsFromResourceRequest removeTagsFromResourceRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(RemoveTagsFromResourceResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("RemoveTagsFromResource")
.withMarshaller(new RemoveTagsFromResourceRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(removeTagsFromResourceRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Modifies the parameters of a cache parameter group to the engine or system default value. You can reset specific
* parameters by submitting a list of parameter names. To reset the entire cache parameter group, specify the
* ResetAllParameters
and CacheParameterGroupName
parameters.
*
*
* @param resetCacheParameterGroupRequest
* Represents the input of a ResetCacheParameterGroup
operation.
* @return A Java Future containing the result of the ResetCacheParameterGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidCacheParameterGroupStateException The current state of the cache parameter group does not
* allow the requested operation to occur.
* - CacheParameterGroupNotFoundException The requested cache parameter group name does not refer to an
* existing cache parameter group.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.ResetCacheParameterGroup
* @see AWS API Documentation
*/
@Override
public CompletableFuture resetCacheParameterGroup(
ResetCacheParameterGroupRequest resetCacheParameterGroupRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ResetCacheParameterGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ResetCacheParameterGroup")
.withMarshaller(new ResetCacheParameterGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(resetCacheParameterGroupRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Revokes ingress from a cache security group. Use this operation to disallow access from an Amazon EC2 security
* group that had been previously authorized.
*
*
* @param revokeCacheSecurityGroupIngressRequest
* Represents the input of a RevokeCacheSecurityGroupIngress
operation.
* @return A Java Future containing the result of the RevokeCacheSecurityGroupIngress operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CacheSecurityGroupNotFoundException The requested cache security group name does not refer to an
* existing cache security group.
* - AuthorizationNotFoundException The specified Amazon EC2 security group is not authorized for the
* specified cache security group.
* - InvalidCacheSecurityGroupStateException The current state of the cache security group does not allow
* deletion.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.RevokeCacheSecurityGroupIngress
* @see AWS API Documentation
*/
@Override
public CompletableFuture revokeCacheSecurityGroupIngress(
RevokeCacheSecurityGroupIngressRequest revokeCacheSecurityGroupIngressRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(RevokeCacheSecurityGroupIngressResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("RevokeCacheSecurityGroupIngress")
.withMarshaller(new RevokeCacheSecurityGroupIngressRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(revokeCacheSecurityGroupIngressRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Represents the input of a TestFailover
operation which test automatic failover on a specified node
* group (called shard in the console) in a replication group (called cluster in the console).
*
*
* Note the following
*
*
* -
*
* A customer can use this operation to test automatic failover on up to 5 shards (called node groups in the
* ElastiCache API and AWS CLI) in any rolling 24-hour period.
*
*
* -
*
* If calling this operation on shards in different clusters (called replication groups in the API and CLI), the
* calls can be made concurrently.
*
*
*
* -
*
* If calling this operation multiple times on different shards in the same Redis (cluster mode enabled) replication
* group, the first node replacement must complete before a subsequent call can be made.
*
*
* -
*
* To determine whether the node replacement is complete you can check Events using the Amazon ElastiCache console,
* the AWS CLI, or the ElastiCache API. Look for the following automatic failover related events, listed here in
* order of occurrance:
*
*
* -
*
* Replication group message: Test Failover API called for node group <node-group-id>
*
*
* -
*
* Cache cluster message:
* Failover from master node <primary-node-id> to replica node <node-id> completed
*
*
* -
*
* Replication group message:
* Failover from master node <primary-node-id> to replica node <node-id> completed
*
*
* -
*
* Cache cluster message: Recovering cache nodes <node-id>
*
*
* -
*
* Cache cluster message: Finished recovery for cache nodes <node-id>
*
*
*
*
* For more information see:
*
*
* -
*
* Viewing ElastiCache
* Events in the ElastiCache User Guide
*
*
* -
*
* DescribeEvents
* in the ElastiCache API Reference
*
*
*
*
*
*
* Also see, Testing
* Multi-AZ with Automatic Failover in the ElastiCache User Guide.
*
*
* @param testFailoverRequest
* @return A Java Future containing the result of the TestFailover operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ApiCallRateForCustomerExceededException The customer has exceeded the allowed rate of API calls.
* - InvalidCacheClusterStateException The requested cluster is not in the
available
state.
* - InvalidReplicationGroupStateException The requested replication group is not in the
*
available
state.
* - NodeGroupNotFoundException The node group specified by the
NodeGroupId
parameter could
* not be found. Please verify that the node group exists and that you spelled the NodeGroupId
* value correctly.
* - ReplicationGroupNotFoundException The specified replication group does not exist.
* - TestFailoverNotAvailableException The
TestFailover
action is not available.
* - InvalidParameterValueException The value for a parameter is invalid.
* - InvalidParameterCombinationException Two or more incompatible parameters were specified.
* - 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.
* - ElastiCacheException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample ElastiCacheAsyncClient.TestFailover
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture testFailover(TestFailoverRequest testFailoverRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(TestFailoverResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("TestFailover").withMarshaller(new TestFailoverRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(testFailoverRequest));
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
@Override
public void close() {
clientHandler.close();
}
private AwsQueryProtocolFactory init() {
return AwsQueryProtocolFactory
.builder()
.registerModeledException(
ExceptionMetadata.builder().errorCode("CacheSubnetGroupNotFoundFault")
.exceptionBuilderSupplier(CacheSubnetGroupNotFoundException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("SubnetInUse")
.exceptionBuilderSupplier(SubnetInUseException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("CacheClusterAlreadyExists")
.exceptionBuilderSupplier(CacheClusterAlreadyExistsException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("CacheSecurityGroupAlreadyExists")
.exceptionBuilderSupplier(CacheSecurityGroupAlreadyExistsException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidCacheSecurityGroupState")
.exceptionBuilderSupplier(InvalidCacheSecurityGroupStateException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("QuotaExceeded.CacheSecurityGroup")
.exceptionBuilderSupplier(CacheSecurityGroupQuotaExceededException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("CacheParameterGroupQuotaExceeded")
.exceptionBuilderSupplier(CacheParameterGroupQuotaExceededException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ReservedCacheNodesOfferingNotFound")
.exceptionBuilderSupplier(ReservedCacheNodesOfferingNotFoundException::builder)
.httpStatusCode(404).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("CacheParameterGroupAlreadyExists")
.exceptionBuilderSupplier(CacheParameterGroupAlreadyExistsException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidARN")
.exceptionBuilderSupplier(InvalidArnException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("TestFailoverNotAvailableFault")
.exceptionBuilderSupplier(TestFailoverNotAvailableException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("CacheParameterGroupNotFound")
.exceptionBuilderSupplier(CacheParameterGroupNotFoundException::builder).httpStatusCode(404)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidVPCNetworkStateFault")
.exceptionBuilderSupplier(InvalidVpcNetworkStateException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ServiceLinkedRoleNotFoundFault")
.exceptionBuilderSupplier(ServiceLinkedRoleNotFoundException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("NodeGroupNotFoundFault")
.exceptionBuilderSupplier(NodeGroupNotFoundException::builder).httpStatusCode(404).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InsufficientCacheClusterCapacity")
.exceptionBuilderSupplier(InsufficientCacheClusterCapacityException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ReservedCacheNodeNotFound")
.exceptionBuilderSupplier(ReservedCacheNodeNotFoundException::builder).httpStatusCode(404)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("CacheSubnetGroupInUse")
.exceptionBuilderSupplier(CacheSubnetGroupInUseException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ReplicationGroupNotFoundFault")
.exceptionBuilderSupplier(ReplicationGroupNotFoundException::builder).httpStatusCode(404).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidSubnet")
.exceptionBuilderSupplier(InvalidSubnetException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("NoOperationFault")
.exceptionBuilderSupplier(NoOperationException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("NodeGroupsPerReplicationGroupQuotaExceeded")
.exceptionBuilderSupplier(NodeGroupsPerReplicationGroupQuotaExceededException::builder)
.httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ReservedCacheNodeQuotaExceeded")
.exceptionBuilderSupplier(ReservedCacheNodeQuotaExceededException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ReservedCacheNodeAlreadyExists")
.exceptionBuilderSupplier(ReservedCacheNodeAlreadyExistsException::builder).httpStatusCode(404)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("CacheClusterNotFound")
.exceptionBuilderSupplier(CacheClusterNotFoundException::builder).httpStatusCode(404).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidParameterValue")
.exceptionBuilderSupplier(InvalidParameterValueException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("SnapshotAlreadyExistsFault")
.exceptionBuilderSupplier(SnapshotAlreadyExistsException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidReplicationGroupState")
.exceptionBuilderSupplier(InvalidReplicationGroupStateException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("SnapshotQuotaExceededFault")
.exceptionBuilderSupplier(SnapshotQuotaExceededException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("NodeQuotaForCustomerExceeded")
.exceptionBuilderSupplier(NodeQuotaForCustomerExceededException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("TagNotFound")
.exceptionBuilderSupplier(TagNotFoundException::builder).httpStatusCode(404).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ClusterQuotaForCustomerExceeded")
.exceptionBuilderSupplier(ClusterQuotaForCustomerExceededException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("APICallRateForCustomerExceeded")
.exceptionBuilderSupplier(ApiCallRateForCustomerExceededException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("NodeQuotaForClusterExceeded")
.exceptionBuilderSupplier(NodeQuotaForClusterExceededException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ServiceUpdateNotFoundFault")
.exceptionBuilderSupplier(ServiceUpdateNotFoundException::builder).httpStatusCode(404).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidCacheClusterState")
.exceptionBuilderSupplier(InvalidCacheClusterStateException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("CacheSubnetQuotaExceededFault")
.exceptionBuilderSupplier(CacheSubnetQuotaExceededException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("SnapshotFeatureNotSupportedFault")
.exceptionBuilderSupplier(SnapshotFeatureNotSupportedException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidSnapshotState")
.exceptionBuilderSupplier(InvalidSnapshotStateException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("CacheSubnetGroupAlreadyExists")
.exceptionBuilderSupplier(CacheSubnetGroupAlreadyExistsException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("CacheSubnetGroupQuotaExceeded")
.exceptionBuilderSupplier(CacheSubnetGroupQuotaExceededException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ReplicationGroupAlreadyExists")
.exceptionBuilderSupplier(ReplicationGroupAlreadyExistsException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidParameterCombination")
.exceptionBuilderSupplier(InvalidParameterCombinationException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("SnapshotNotFoundFault")
.exceptionBuilderSupplier(SnapshotNotFoundException::builder).httpStatusCode(404).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("CacheSecurityGroupNotFound")
.exceptionBuilderSupplier(CacheSecurityGroupNotFoundException::builder).httpStatusCode(404)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidCacheParameterGroupState")
.exceptionBuilderSupplier(InvalidCacheParameterGroupStateException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("TagQuotaPerResourceExceeded")
.exceptionBuilderSupplier(TagQuotaPerResourceExceededException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("AuthorizationAlreadyExists")
.exceptionBuilderSupplier(AuthorizationAlreadyExistsException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("AuthorizationNotFound")
.exceptionBuilderSupplier(AuthorizationNotFoundException::builder).httpStatusCode(404).build())
.clientConfiguration(clientConfiguration).defaultServiceExceptionSupplier(ElastiCacheException::builder).build();
}
private T applyPaginatorUserAgent(T request) {
Consumer userAgentApplier = b -> b.addApiName(ApiName.builder()
.version(VersionInfo.SDK_VERSION).name("PAGINATED").build());
AwsRequestOverrideConfiguration overrideConfiguration = request.overrideConfiguration()
.map(c -> c.toBuilder().applyMutation(userAgentApplier).build())
.orElse((AwsRequestOverrideConfiguration.builder().applyMutation(userAgentApplier).build()));
return (T) request.toBuilder().overrideConfiguration(overrideConfiguration).build();
}
}