/* * Copyright 2018-2023 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 com.amazonaws.services.dax; import org.w3c.dom.*; import java.net.*; import java.util.*; import javax.annotation.Generated; import org.apache.commons.logging.*; import com.amazonaws.*; import com.amazonaws.annotation.SdkInternalApi; import com.amazonaws.auth.*; import com.amazonaws.handlers.*; import com.amazonaws.http.*; import com.amazonaws.internal.*; import com.amazonaws.internal.auth.*; import com.amazonaws.metrics.*; import com.amazonaws.regions.*; import com.amazonaws.transform.*; import com.amazonaws.util.*; import com.amazonaws.protocol.json.*; import com.amazonaws.util.AWSRequestMetrics.Field; import com.amazonaws.annotation.ThreadSafe; import com.amazonaws.client.AwsSyncClientParams; import com.amazonaws.client.builder.AdvancedConfig; import com.amazonaws.services.dax.AmazonDaxClientBuilder; import com.amazonaws.AmazonServiceException; import com.amazonaws.services.dax.model.*; import com.amazonaws.services.dax.model.transform.*; /** * Client for accessing Amazon DAX. All service calls made using this client are blocking, and will not return until the * service call completes. *

*

* DAX is a managed caching service engineered for Amazon DynamoDB. DAX dramatically speeds up database reads by caching * frequently-accessed data from DynamoDB, so applications can access that data with sub-millisecond latency. You can * create a DAX cluster easily, using the AWS Management Console. With a few simple modifications to your code, your * application can begin taking advantage of the DAX cluster and realize significant improvements in read performance. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonDaxClient extends AmazonWebServiceClient implements AmazonDax { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AmazonDax.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "dax"; /** Client configuration factory providing ClientConfigurations tailored to this client */ protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory(); private final AdvancedConfig advancedConfig; private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory( new JsonClientMetadata() .withProtocolVersion("1.1") .withSupportsCbor(false) .withSupportsIon(false) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("SubnetQuotaExceededFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.SubnetQuotaExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("SubnetGroupNotFoundFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.SubnetGroupNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("SubnetGroupQuotaExceededFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.SubnetGroupQuotaExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidVPCNetworkStateFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.InvalidVPCNetworkStateExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ParameterGroupAlreadyExistsFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.ParameterGroupAlreadyExistsExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("SubnetInUse").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.SubnetInUseExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ClusterNotFoundFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.ClusterNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidParameterValueException").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.InvalidParameterValueExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("NodeNotFoundFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.NodeNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidParameterCombinationException").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.InvalidParameterCombinationExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("NodeQuotaForCustomerExceededFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.NodeQuotaForCustomerExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidClusterStateFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.InvalidClusterStateExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InsufficientClusterCapacityFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.InsufficientClusterCapacityExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ServiceQuotaExceededException").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.ServiceQuotaExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("TagNotFoundFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.TagNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidARNFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.InvalidARNExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("TagQuotaPerResourceExceeded").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.TagQuotaPerResourceExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ClusterQuotaForCustomerExceededFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.ClusterQuotaForCustomerExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("SubnetGroupInUseFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.SubnetGroupInUseExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidParameterGroupStateFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.InvalidParameterGroupStateExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ParameterGroupNotFoundFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.ParameterGroupNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidSubnet").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.InvalidSubnetExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ClusterAlreadyExistsFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.ClusterAlreadyExistsExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ServiceLinkedRoleNotFoundFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.ServiceLinkedRoleNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("NodeQuotaForClusterExceededFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.NodeQuotaForClusterExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ParameterGroupQuotaExceededFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.ParameterGroupQuotaExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("SubnetGroupAlreadyExistsFault").withExceptionUnmarshaller( com.amazonaws.services.dax.model.transform.SubnetGroupAlreadyExistsExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.dax.model.AmazonDaxException.class)); public static AmazonDaxClientBuilder builder() { return AmazonDaxClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on Amazon DAX using the specified parameters. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AmazonDaxClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on Amazon DAX using the specified parameters. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AmazonDaxClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) { super(clientParams); this.awsCredentialsProvider = clientParams.getCredentialsProvider(); this.advancedConfig = clientParams.getAdvancedConfig(); init(); } private void init() { setServiceNameIntern(DEFAULT_SIGNING_NAME); setEndpointPrefix(ENDPOINT_PREFIX); // calling this.setEndPoint(...) will also modify the signer accordingly setEndpoint("dax.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/dax/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/dax/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *

* Creates a DAX cluster. All nodes in the cluster run the same DAX caching software. *

* * @param createClusterRequest * @return Result of the CreateCluster operation returned by the service. * @throws ClusterAlreadyExistsException * You already have a DAX cluster with the given identifier. * @throws InvalidClusterStateException * The requested DAX cluster is not in the available state. * @throws InsufficientClusterCapacityException * There are not enough system resources to create the cluster you requested (or to resize an * already-existing cluster). * @throws SubnetGroupNotFoundException * The requested subnet group name does not refer to an existing subnet group. * @throws InvalidParameterGroupStateException * One or more parameters in a parameter group are in an invalid state. * @throws ParameterGroupNotFoundException * The specified parameter group does not exist. * @throws ClusterQuotaForCustomerExceededException * You have attempted to exceed the maximum number of DAX clusters for your AWS account. * @throws NodeQuotaForClusterExceededException * You have attempted to exceed the maximum number of nodes for a DAX cluster. * @throws NodeQuotaForCustomerExceededException * You have attempted to exceed the maximum number of nodes for your AWS account. * @throws InvalidVPCNetworkStateException * The VPC network is in an invalid state. * @throws TagQuotaPerResourceExceededException * You have exceeded the maximum number of tags for this DAX cluster. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @throws InvalidParameterValueException * The value for a parameter is invalid. * @throws InvalidParameterCombinationException * Two or more incompatible parameters were specified. * @throws ServiceQuotaExceededException * You have reached the maximum number of x509 certificates that can be created for encrypted clusters in a * 30 day period. Contact AWS customer support to discuss options for continuing to create encrypted * clusters. * @sample AmazonDax.CreateCluster * @see AWS API * Documentation */ @Override public CreateClusterResult createCluster(CreateClusterRequest request) { request = beforeClientExecution(request); return executeCreateCluster(request); } @SdkInternalApi final CreateClusterResult executeCreateCluster(CreateClusterRequest createClusterRequest) { ExecutionContext executionContext = createExecutionContext(createClusterRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateClusterRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createClusterRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateCluster"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateClusterResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new parameter group. A parameter group is a collection of parameters that you apply to all of the nodes * in a DAX cluster. *

* * @param createParameterGroupRequest * @return Result of the CreateParameterGroup operation returned by the service. * @throws ParameterGroupQuotaExceededException * You have attempted to exceed the maximum number of parameter groups. * @throws ParameterGroupAlreadyExistsException * The specified parameter group already exists. * @throws InvalidParameterGroupStateException * One or more parameters in a parameter group are in an invalid state. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @throws InvalidParameterValueException * The value for a parameter is invalid. * @throws InvalidParameterCombinationException * Two or more incompatible parameters were specified. * @sample AmazonDax.CreateParameterGroup * @see AWS API * Documentation */ @Override public CreateParameterGroupResult createParameterGroup(CreateParameterGroupRequest request) { request = beforeClientExecution(request); return executeCreateParameterGroup(request); } @SdkInternalApi final CreateParameterGroupResult executeCreateParameterGroup(CreateParameterGroupRequest createParameterGroupRequest) { ExecutionContext executionContext = createExecutionContext(createParameterGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateParameterGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createParameterGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateParameterGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateParameterGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new subnet group. *

* * @param createSubnetGroupRequest * @return Result of the CreateSubnetGroup operation returned by the service. * @throws SubnetGroupAlreadyExistsException * The specified subnet group already exists. * @throws SubnetGroupQuotaExceededException * The request cannot be processed because it would exceed the allowed number of subnets in a subnet group. * @throws SubnetQuotaExceededException * The request cannot be processed because it would exceed the allowed number of subnets in a subnet group. * @throws InvalidSubnetException * An invalid subnet identifier was specified. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @sample AmazonDax.CreateSubnetGroup * @see AWS API * Documentation */ @Override public CreateSubnetGroupResult createSubnetGroup(CreateSubnetGroupRequest request) { request = beforeClientExecution(request); return executeCreateSubnetGroup(request); } @SdkInternalApi final CreateSubnetGroupResult executeCreateSubnetGroup(CreateSubnetGroupRequest createSubnetGroupRequest) { ExecutionContext executionContext = createExecutionContext(createSubnetGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateSubnetGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createSubnetGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateSubnetGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateSubnetGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes one or more nodes from a DAX cluster. *

* *

* You cannot use DecreaseReplicationFactor to remove the last node in a DAX cluster. If you need to do * this, use DeleteCluster instead. *

*
* * @param decreaseReplicationFactorRequest * @return Result of the DecreaseReplicationFactor operation returned by the service. * @throws ClusterNotFoundException * The requested cluster ID does not refer to an existing DAX cluster. * @throws NodeNotFoundException * None of the nodes in the cluster have the given node ID. * @throws InvalidClusterStateException * The requested DAX cluster is not in the available state. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @throws InvalidParameterValueException * The value for a parameter is invalid. * @throws InvalidParameterCombinationException * Two or more incompatible parameters were specified. * @sample AmazonDax.DecreaseReplicationFactor * @see AWS * API Documentation */ @Override public DecreaseReplicationFactorResult decreaseReplicationFactor(DecreaseReplicationFactorRequest request) { request = beforeClientExecution(request); return executeDecreaseReplicationFactor(request); } @SdkInternalApi final DecreaseReplicationFactorResult executeDecreaseReplicationFactor(DecreaseReplicationFactorRequest decreaseReplicationFactorRequest) { ExecutionContext executionContext = createExecutionContext(decreaseReplicationFactorRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DecreaseReplicationFactorRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(decreaseReplicationFactorRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DecreaseReplicationFactor"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DecreaseReplicationFactorResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a previously provisioned DAX cluster. DeleteCluster deletes all associated nodes, node endpoints * and the DAX cluster itself. When you receive a successful response from this action, DAX immediately begins * deleting the cluster; you cannot cancel or revert this action. *

* * @param deleteClusterRequest * @return Result of the DeleteCluster operation returned by the service. * @throws ClusterNotFoundException * The requested cluster ID does not refer to an existing DAX cluster. * @throws InvalidClusterStateException * The requested DAX cluster is not in the available state. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @throws InvalidParameterValueException * The value for a parameter is invalid. * @throws InvalidParameterCombinationException * Two or more incompatible parameters were specified. * @sample AmazonDax.DeleteCluster * @see AWS API * Documentation */ @Override public DeleteClusterResult deleteCluster(DeleteClusterRequest request) { request = beforeClientExecution(request); return executeDeleteCluster(request); } @SdkInternalApi final DeleteClusterResult executeDeleteCluster(DeleteClusterRequest deleteClusterRequest) { ExecutionContext executionContext = createExecutionContext(deleteClusterRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteClusterRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteClusterRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteCluster"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteClusterResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes the specified parameter group. You cannot delete a parameter group if it is associated with any DAX * clusters. *

* * @param deleteParameterGroupRequest * @return Result of the DeleteParameterGroup operation returned by the service. * @throws InvalidParameterGroupStateException * One or more parameters in a parameter group are in an invalid state. * @throws ParameterGroupNotFoundException * The specified parameter group does not exist. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @throws InvalidParameterValueException * The value for a parameter is invalid. * @throws InvalidParameterCombinationException * Two or more incompatible parameters were specified. * @sample AmazonDax.DeleteParameterGroup * @see AWS API * Documentation */ @Override public DeleteParameterGroupResult deleteParameterGroup(DeleteParameterGroupRequest request) { request = beforeClientExecution(request); return executeDeleteParameterGroup(request); } @SdkInternalApi final DeleteParameterGroupResult executeDeleteParameterGroup(DeleteParameterGroupRequest deleteParameterGroupRequest) { ExecutionContext executionContext = createExecutionContext(deleteParameterGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteParameterGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteParameterGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteParameterGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteParameterGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a subnet group. *

* *

* You cannot delete a subnet group if it is associated with any DAX clusters. *

*
* * @param deleteSubnetGroupRequest * @return Result of the DeleteSubnetGroup operation returned by the service. * @throws SubnetGroupInUseException * The specified subnet group is currently in use. * @throws SubnetGroupNotFoundException * The requested subnet group name does not refer to an existing subnet group. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @sample AmazonDax.DeleteSubnetGroup * @see AWS API * Documentation */ @Override public DeleteSubnetGroupResult deleteSubnetGroup(DeleteSubnetGroupRequest request) { request = beforeClientExecution(request); return executeDeleteSubnetGroup(request); } @SdkInternalApi final DeleteSubnetGroupResult executeDeleteSubnetGroup(DeleteSubnetGroupRequest deleteSubnetGroupRequest) { ExecutionContext executionContext = createExecutionContext(deleteSubnetGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteSubnetGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteSubnetGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteSubnetGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteSubnetGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns information about all provisioned DAX clusters if no cluster identifier is specified, or about a specific * DAX cluster if a cluster identifier is supplied. *

*

* If the cluster is in the CREATING state, only cluster level information will be displayed until all of the nodes * are successfully provisioned. *

*

* If the cluster is in the DELETING state, only cluster level information will be displayed. *

*

* If nodes are currently being added to the DAX cluster, node endpoint information and creation time for the * additional nodes will not be displayed until they are completely provisioned. When the DAX cluster state is * available, the cluster is ready for use. *

*

* If nodes are currently being removed from the DAX cluster, no endpoint information for the removed nodes is * displayed. *

* * @param describeClustersRequest * @return Result of the DescribeClusters operation returned by the service. * @throws ClusterNotFoundException * The requested cluster ID does not refer to an existing DAX cluster. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @throws InvalidParameterValueException * The value for a parameter is invalid. * @throws InvalidParameterCombinationException * Two or more incompatible parameters were specified. * @sample AmazonDax.DescribeClusters * @see AWS API * Documentation */ @Override public DescribeClustersResult describeClusters(DescribeClustersRequest request) { request = beforeClientExecution(request); return executeDescribeClusters(request); } @SdkInternalApi final DescribeClustersResult executeDescribeClusters(DescribeClustersRequest describeClustersRequest) { ExecutionContext executionContext = createExecutionContext(describeClustersRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeClustersRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeClustersRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeClusters"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeClustersResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns the default system parameter information for the DAX caching software. *

* * @param describeDefaultParametersRequest * @return Result of the DescribeDefaultParameters operation returned by the service. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @throws InvalidParameterValueException * The value for a parameter is invalid. * @throws InvalidParameterCombinationException * Two or more incompatible parameters were specified. * @sample AmazonDax.DescribeDefaultParameters * @see AWS * API Documentation */ @Override public DescribeDefaultParametersResult describeDefaultParameters(DescribeDefaultParametersRequest request) { request = beforeClientExecution(request); return executeDescribeDefaultParameters(request); } @SdkInternalApi final DescribeDefaultParametersResult executeDescribeDefaultParameters(DescribeDefaultParametersRequest describeDefaultParametersRequest) { ExecutionContext executionContext = createExecutionContext(describeDefaultParametersRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeDefaultParametersRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describeDefaultParametersRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDefaultParameters"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeDefaultParametersResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns events related to DAX clusters and parameter groups. You can obtain events specific to a particular DAX * cluster or parameter group by providing the name as a parameter. *

*

* By default, only the events occurring within the last 24 hours are returned; however, you can retrieve up to 14 * days' worth of events if necessary. *

* * @param describeEventsRequest * @return Result of the DescribeEvents operation returned by the service. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @throws InvalidParameterValueException * The value for a parameter is invalid. * @throws InvalidParameterCombinationException * Two or more incompatible parameters were specified. * @sample AmazonDax.DescribeEvents * @see AWS API * Documentation */ @Override public DescribeEventsResult describeEvents(DescribeEventsRequest request) { request = beforeClientExecution(request); return executeDescribeEvents(request); } @SdkInternalApi final DescribeEventsResult executeDescribeEvents(DescribeEventsRequest describeEventsRequest) { ExecutionContext executionContext = createExecutionContext(describeEventsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeEventsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeEventsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeEvents"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeEventsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of parameter group descriptions. If a parameter group name is specified, the list will contain * only the descriptions for that group. *

* * @param describeParameterGroupsRequest * @return Result of the DescribeParameterGroups operation returned by the service. * @throws ParameterGroupNotFoundException * The specified parameter group does not exist. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @throws InvalidParameterValueException * The value for a parameter is invalid. * @throws InvalidParameterCombinationException * Two or more incompatible parameters were specified. * @sample AmazonDax.DescribeParameterGroups * @see AWS * API Documentation */ @Override public DescribeParameterGroupsResult describeParameterGroups(DescribeParameterGroupsRequest request) { request = beforeClientExecution(request); return executeDescribeParameterGroups(request); } @SdkInternalApi final DescribeParameterGroupsResult executeDescribeParameterGroups(DescribeParameterGroupsRequest describeParameterGroupsRequest) { ExecutionContext executionContext = createExecutionContext(describeParameterGroupsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeParameterGroupsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describeParameterGroupsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeParameterGroups"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeParameterGroupsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns the detailed parameter list for a particular parameter group. *

* * @param describeParametersRequest * @return Result of the DescribeParameters operation returned by the service. * @throws ParameterGroupNotFoundException * The specified parameter group does not exist. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @throws InvalidParameterValueException * The value for a parameter is invalid. * @throws InvalidParameterCombinationException * Two or more incompatible parameters were specified. * @sample AmazonDax.DescribeParameters * @see AWS API * Documentation */ @Override public DescribeParametersResult describeParameters(DescribeParametersRequest request) { request = beforeClientExecution(request); return executeDescribeParameters(request); } @SdkInternalApi final DescribeParametersResult executeDescribeParameters(DescribeParametersRequest describeParametersRequest) { ExecutionContext executionContext = createExecutionContext(describeParametersRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeParametersRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeParametersRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeParameters"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeParametersResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of subnet group descriptions. If a subnet group name is specified, the list will contain only the * description of that group. *

* * @param describeSubnetGroupsRequest * @return Result of the DescribeSubnetGroups operation returned by the service. * @throws SubnetGroupNotFoundException * The requested subnet group name does not refer to an existing subnet group. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @sample AmazonDax.DescribeSubnetGroups * @see AWS API * Documentation */ @Override public DescribeSubnetGroupsResult describeSubnetGroups(DescribeSubnetGroupsRequest request) { request = beforeClientExecution(request); return executeDescribeSubnetGroups(request); } @SdkInternalApi final DescribeSubnetGroupsResult executeDescribeSubnetGroups(DescribeSubnetGroupsRequest describeSubnetGroupsRequest) { ExecutionContext executionContext = createExecutionContext(describeSubnetGroupsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeSubnetGroupsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeSubnetGroupsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeSubnetGroups"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeSubnetGroupsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Adds one or more nodes to a DAX cluster. *

* * @param increaseReplicationFactorRequest * @return Result of the IncreaseReplicationFactor operation returned by the service. * @throws ClusterNotFoundException * The requested cluster ID does not refer to an existing DAX cluster. * @throws InvalidClusterStateException * The requested DAX cluster is not in the available state. * @throws InsufficientClusterCapacityException * There are not enough system resources to create the cluster you requested (or to resize an * already-existing cluster). * @throws InvalidVPCNetworkStateException * The VPC network is in an invalid state. * @throws NodeQuotaForClusterExceededException * You have attempted to exceed the maximum number of nodes for a DAX cluster. * @throws NodeQuotaForCustomerExceededException * You have attempted to exceed the maximum number of nodes for your AWS account. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @throws InvalidParameterValueException * The value for a parameter is invalid. * @throws InvalidParameterCombinationException * Two or more incompatible parameters were specified. * @sample AmazonDax.IncreaseReplicationFactor * @see AWS * API Documentation */ @Override public IncreaseReplicationFactorResult increaseReplicationFactor(IncreaseReplicationFactorRequest request) { request = beforeClientExecution(request); return executeIncreaseReplicationFactor(request); } @SdkInternalApi final IncreaseReplicationFactorResult executeIncreaseReplicationFactor(IncreaseReplicationFactorRequest increaseReplicationFactorRequest) { ExecutionContext executionContext = createExecutionContext(increaseReplicationFactorRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new IncreaseReplicationFactorRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(increaseReplicationFactorRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "IncreaseReplicationFactor"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new IncreaseReplicationFactorResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* List all of the tags for a DAX cluster. You can call ListTags up to 10 times per second, per * account. *

* * @param listTagsRequest * @return Result of the ListTags operation returned by the service. * @throws ClusterNotFoundException * The requested cluster ID does not refer to an existing DAX cluster. * @throws InvalidARNException * The Amazon Resource Name (ARN) supplied in the request is not valid. * @throws InvalidClusterStateException * The requested DAX cluster is not in the available state. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @throws InvalidParameterValueException * The value for a parameter is invalid. * @throws InvalidParameterCombinationException * Two or more incompatible parameters were specified. * @sample AmazonDax.ListTags * @see AWS API * Documentation */ @Override public ListTagsResult listTags(ListTagsRequest request) { request = beforeClientExecution(request); return executeListTags(request); } @SdkInternalApi final ListTagsResult executeListTags(ListTagsRequest listTagsRequest) { ExecutionContext executionContext = createExecutionContext(listTagsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListTagsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTagsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTags"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTagsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Reboots a single node of a DAX cluster. The reboot action takes place as soon as possible. During the reboot, the * node status is set to REBOOTING. *

* *

* RebootNode restarts the DAX engine process and does not remove the contents of the cache. *

*
* * @param rebootNodeRequest * @return Result of the RebootNode operation returned by the service. * @throws ClusterNotFoundException * The requested cluster ID does not refer to an existing DAX cluster. * @throws NodeNotFoundException * None of the nodes in the cluster have the given node ID. * @throws InvalidClusterStateException * The requested DAX cluster is not in the available state. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @throws InvalidParameterValueException * The value for a parameter is invalid. * @throws InvalidParameterCombinationException * Two or more incompatible parameters were specified. * @sample AmazonDax.RebootNode * @see AWS API * Documentation */ @Override public RebootNodeResult rebootNode(RebootNodeRequest request) { request = beforeClientExecution(request); return executeRebootNode(request); } @SdkInternalApi final RebootNodeResult executeRebootNode(RebootNodeRequest rebootNodeRequest) { ExecutionContext executionContext = createExecutionContext(rebootNodeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RebootNodeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(rebootNodeRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RebootNode"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new RebootNodeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Associates a set of tags with a DAX resource. You can call TagResource up to 5 times per second, per * account. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws ClusterNotFoundException * The requested cluster ID does not refer to an existing DAX cluster. * @throws TagQuotaPerResourceExceededException * You have exceeded the maximum number of tags for this DAX cluster. * @throws InvalidARNException * The Amazon Resource Name (ARN) supplied in the request is not valid. * @throws InvalidClusterStateException * The requested DAX cluster is not in the available state. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @throws InvalidParameterValueException * The value for a parameter is invalid. * @throws InvalidParameterCombinationException * Two or more incompatible parameters were specified. * @sample AmazonDax.TagResource * @see AWS API * Documentation */ @Override public TagResourceResult tagResource(TagResourceRequest request) { request = beforeClientExecution(request); return executeTagResource(request); } @SdkInternalApi final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) { ExecutionContext executionContext = createExecutionContext(tagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes the association of tags from a DAX resource. You can call UntagResource up to 5 times per * second, per account. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws ClusterNotFoundException * The requested cluster ID does not refer to an existing DAX cluster. * @throws InvalidARNException * The Amazon Resource Name (ARN) supplied in the request is not valid. * @throws TagNotFoundException * The tag does not exist. * @throws InvalidClusterStateException * The requested DAX cluster is not in the available state. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @throws InvalidParameterValueException * The value for a parameter is invalid. * @throws InvalidParameterCombinationException * Two or more incompatible parameters were specified. * @sample AmazonDax.UntagResource * @see AWS API * Documentation */ @Override public UntagResourceResult untagResource(UntagResourceRequest request) { request = beforeClientExecution(request); return executeUntagResource(request); } @SdkInternalApi final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) { ExecutionContext executionContext = createExecutionContext(untagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Modifies the settings for a DAX cluster. You can use this action to change one or more cluster configuration * parameters by specifying the parameters and the new values. *

* * @param updateClusterRequest * @return Result of the UpdateCluster operation returned by the service. * @throws InvalidClusterStateException * The requested DAX cluster is not in the available state. * @throws ClusterNotFoundException * The requested cluster ID does not refer to an existing DAX cluster. * @throws InvalidParameterGroupStateException * One or more parameters in a parameter group are in an invalid state. * @throws ParameterGroupNotFoundException * The specified parameter group does not exist. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @throws InvalidParameterValueException * The value for a parameter is invalid. * @throws InvalidParameterCombinationException * Two or more incompatible parameters were specified. * @sample AmazonDax.UpdateCluster * @see AWS API * Documentation */ @Override public UpdateClusterResult updateCluster(UpdateClusterRequest request) { request = beforeClientExecution(request); return executeUpdateCluster(request); } @SdkInternalApi final UpdateClusterResult executeUpdateCluster(UpdateClusterRequest updateClusterRequest) { ExecutionContext executionContext = createExecutionContext(updateClusterRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateClusterRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateClusterRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateCluster"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateClusterResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Modifies the parameters of a parameter group. You can modify up to 20 parameters in a single request by * submitting a list parameter name and value pairs. *

* * @param updateParameterGroupRequest * @return Result of the UpdateParameterGroup operation returned by the service. * @throws InvalidParameterGroupStateException * One or more parameters in a parameter group are in an invalid state. * @throws ParameterGroupNotFoundException * The specified parameter group does not exist. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @throws InvalidParameterValueException * The value for a parameter is invalid. * @throws InvalidParameterCombinationException * Two or more incompatible parameters were specified. * @sample AmazonDax.UpdateParameterGroup * @see AWS API * Documentation */ @Override public UpdateParameterGroupResult updateParameterGroup(UpdateParameterGroupRequest request) { request = beforeClientExecution(request); return executeUpdateParameterGroup(request); } @SdkInternalApi final UpdateParameterGroupResult executeUpdateParameterGroup(UpdateParameterGroupRequest updateParameterGroupRequest) { ExecutionContext executionContext = createExecutionContext(updateParameterGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateParameterGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateParameterGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateParameterGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateParameterGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Modifies an existing subnet group. *

* * @param updateSubnetGroupRequest * @return Result of the UpdateSubnetGroup operation returned by the service. * @throws SubnetGroupNotFoundException * The requested subnet group name does not refer to an existing subnet group. * @throws SubnetQuotaExceededException * The request cannot be processed because it would exceed the allowed number of subnets in a subnet group. * @throws SubnetInUseException * The requested subnet is being used by another subnet group. * @throws InvalidSubnetException * An invalid subnet identifier was specified. * @throws ServiceLinkedRoleNotFoundException * The specified service linked role (SLR) was not found. * @sample AmazonDax.UpdateSubnetGroup * @see AWS API * Documentation */ @Override public UpdateSubnetGroupResult updateSubnetGroup(UpdateSubnetGroupRequest request) { request = beforeClientExecution(request); return executeUpdateSubnetGroup(request); } @SdkInternalApi final UpdateSubnetGroupResult executeUpdateSubnetGroup(UpdateSubnetGroupRequest updateSubnetGroupRequest) { ExecutionContext executionContext = createExecutionContext(updateSubnetGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateSubnetGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateSubnetGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateSubnetGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateSubnetGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * Returns additional metadata for a previously executed successful, request, typically used for debugging issues * where a service isn't acting as expected. This data isn't considered part of the result data returned by an * operation, so it's available through this separate, diagnostic interface. *

* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic * information for an executed request, you should use this method to retrieve it as soon as possible after * executing the request. * * @param request * The originally executed request * * @return The response metadata for the specified request, or null if none is available. */ public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) { return client.getResponseMetadataForRequest(request); } /** * Normal invoke with authentication. Credentials are required and may be overriden at the request level. **/ private Response invoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { return invoke(request, responseHandler, executionContext, null, null); } /** * Normal invoke with authentication. Credentials are required and may be overriden at the request level. **/ private Response invoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext, URI cachedEndpoint, URI uriFromEndpointTrait) { executionContext.setCredentialsProvider(CredentialUtils.getCredentialsProvider(request.getOriginalRequest(), awsCredentialsProvider)); return doInvoke(request, responseHandler, executionContext, cachedEndpoint, uriFromEndpointTrait); } /** * Invoke with no authentication. Credentials are not required and any credentials set on the client or request will * be ignored for this operation. **/ private Response anonymousInvoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { return doInvoke(request, responseHandler, executionContext, null, null); } /** * Invoke the request using the http client. Assumes credentials (or lack thereof) have been configured in the * ExecutionContext beforehand. **/ private Response doInvoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) { if (discoveredEndpoint != null) { request.setEndpoint(discoveredEndpoint); request.getOriginalRequest().getRequestClientOptions().appendUserAgent("endpoint-discovery"); } else if (uriFromEndpointTrait != null) { request.setEndpoint(uriFromEndpointTrait); } else { request.setEndpoint(endpoint); } request.setTimeOffset(timeOffset); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata()); return client.execute(request, responseHandler, errorResponseHandler, executionContext); } @com.amazonaws.annotation.SdkInternalApi static com.amazonaws.protocol.json.SdkJsonProtocolFactory getProtocolFactory() { return protocolFactory; } @Override public void shutdown() { super.shutdown(); } }