All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.docdb.AmazonDocDBClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon DocumentDB with MongoDB compatibility module holds the client classes that are used for communicating with Amazon DocumentDB with MongoDB compatibility Service

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2019-2024 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.docdb;

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.docdb.AmazonDocDBClientBuilder;
import com.amazonaws.services.docdb.waiters.AmazonDocDBWaiters;

import com.amazonaws.AmazonServiceException;

import com.amazonaws.services.docdb.model.*;

import com.amazonaws.services.docdb.model.transform.*;

/**
 * Client for accessing Amazon DocDB. All service calls made using this client are blocking, and will not return until
 * the service call completes.
 * 

*

* Amazon DocumentDB is a fast, reliable, and fully managed database service. Amazon DocumentDB makes it easy to set up, * operate, and scale MongoDB-compatible databases in the cloud. With Amazon DocumentDB, you can run the same * application code and use the same drivers and tools that you use with MongoDB. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonDocDBClient extends AmazonWebServiceClient implements AmazonDocDB { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AmazonDocDB.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "rds"; private volatile AmazonDocDBWaiters waiters; /** Client configuration factory providing ClientConfigurations tailored to this client */ protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory(); private final AdvancedConfig advancedConfig; /** * Map of exception unmarshallers for all modeled exceptions */ private final Map> exceptionUnmarshallersMap = new HashMap>(); /** * List of exception unmarshallers for all modeled exceptions Even though this exceptionUnmarshallers is not used in * Clients, this is not removed since this was directly used by Client extended classes. Using this list can cause * performance impact. */ protected final List> exceptionUnmarshallers = new ArrayList>(); protected Unmarshaller defaultUnmarshaller; public static AmazonDocDBClientBuilder builder() { return AmazonDocDBClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on Amazon DocDB 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. */ AmazonDocDBClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on Amazon DocDB 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. */ AmazonDocDBClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) { super(clientParams); this.awsCredentialsProvider = clientParams.getCredentialsProvider(); this.advancedConfig = clientParams.getAdvancedConfig(); init(); } private void init() { if (exceptionUnmarshallersMap.get("DBSubnetGroupDoesNotCoverEnoughAZs") == null) { exceptionUnmarshallersMap.put("DBSubnetGroupDoesNotCoverEnoughAZs", new DBSubnetGroupDoesNotCoverEnoughAZsExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBSubnetGroupDoesNotCoverEnoughAZsExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBClusterSnapshotNotFoundFault") == null) { exceptionUnmarshallersMap.put("DBClusterSnapshotNotFoundFault", new DBClusterSnapshotNotFoundExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBClusterSnapshotNotFoundExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBSubnetGroupNotFoundFault") == null) { exceptionUnmarshallersMap.put("DBSubnetGroupNotFoundFault", new DBSubnetGroupNotFoundExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBSubnetGroupNotFoundExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("InstanceQuotaExceeded") == null) { exceptionUnmarshallersMap.put("InstanceQuotaExceeded", new InstanceQuotaExceededExceptionUnmarshaller()); } exceptionUnmarshallers.add(new InstanceQuotaExceededExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBClusterParameterGroupNotFound") == null) { exceptionUnmarshallersMap.put("DBClusterParameterGroupNotFound", new DBClusterParameterGroupNotFoundExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBClusterParameterGroupNotFoundExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("SnapshotQuotaExceeded") == null) { exceptionUnmarshallersMap.put("SnapshotQuotaExceeded", new SnapshotQuotaExceededExceptionUnmarshaller()); } exceptionUnmarshallers.add(new SnapshotQuotaExceededExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("GlobalClusterQuotaExceededFault") == null) { exceptionUnmarshallersMap.put("GlobalClusterQuotaExceededFault", new GlobalClusterQuotaExceededExceptionUnmarshaller()); } exceptionUnmarshallers.add(new GlobalClusterQuotaExceededExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBInstanceNotFound") == null) { exceptionUnmarshallersMap.put("DBInstanceNotFound", new DBInstanceNotFoundExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBInstanceNotFoundExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBSnapshotNotFound") == null) { exceptionUnmarshallersMap.put("DBSnapshotNotFound", new DBSnapshotNotFoundExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBSnapshotNotFoundExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("SubscriptionCategoryNotFound") == null) { exceptionUnmarshallersMap.put("SubscriptionCategoryNotFound", new SubscriptionCategoryNotFoundExceptionUnmarshaller()); } exceptionUnmarshallers.add(new SubscriptionCategoryNotFoundExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("InvalidRestoreFault") == null) { exceptionUnmarshallersMap.put("InvalidRestoreFault", new InvalidRestoreExceptionUnmarshaller()); } exceptionUnmarshallers.add(new InvalidRestoreExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("GlobalClusterAlreadyExistsFault") == null) { exceptionUnmarshallersMap.put("GlobalClusterAlreadyExistsFault", new GlobalClusterAlreadyExistsExceptionUnmarshaller()); } exceptionUnmarshallers.add(new GlobalClusterAlreadyExistsExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBInstanceAlreadyExists") == null) { exceptionUnmarshallersMap.put("DBInstanceAlreadyExists", new DBInstanceAlreadyExistsExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBInstanceAlreadyExistsExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBSnapshotAlreadyExists") == null) { exceptionUnmarshallersMap.put("DBSnapshotAlreadyExists", new DBSnapshotAlreadyExistsExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBSnapshotAlreadyExistsExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("SharedSnapshotQuotaExceeded") == null) { exceptionUnmarshallersMap.put("SharedSnapshotQuotaExceeded", new SharedSnapshotQuotaExceededExceptionUnmarshaller()); } exceptionUnmarshallers.add(new SharedSnapshotQuotaExceededExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("SNSInvalidTopic") == null) { exceptionUnmarshallersMap.put("SNSInvalidTopic", new SNSInvalidTopicExceptionUnmarshaller()); } exceptionUnmarshallers.add(new SNSInvalidTopicExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("InvalidGlobalClusterStateFault") == null) { exceptionUnmarshallersMap.put("InvalidGlobalClusterStateFault", new InvalidGlobalClusterStateExceptionUnmarshaller()); } exceptionUnmarshallers.add(new InvalidGlobalClusterStateExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBParameterGroupAlreadyExists") == null) { exceptionUnmarshallersMap.put("DBParameterGroupAlreadyExists", new DBParameterGroupAlreadyExistsExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBParameterGroupAlreadyExistsExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("InvalidDBInstanceState") == null) { exceptionUnmarshallersMap.put("InvalidDBInstanceState", new InvalidDBInstanceStateExceptionUnmarshaller()); } exceptionUnmarshallers.add(new InvalidDBInstanceStateExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("InvalidDBSubnetGroupStateFault") == null) { exceptionUnmarshallersMap.put("InvalidDBSubnetGroupStateFault", new InvalidDBSubnetGroupStateExceptionUnmarshaller()); } exceptionUnmarshallers.add(new InvalidDBSubnetGroupStateExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("InsufficientDBClusterCapacityFault") == null) { exceptionUnmarshallersMap.put("InsufficientDBClusterCapacityFault", new InsufficientDBClusterCapacityExceptionUnmarshaller()); } exceptionUnmarshallers.add(new InsufficientDBClusterCapacityExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("InvalidDBSubnetStateFault") == null) { exceptionUnmarshallersMap.put("InvalidDBSubnetStateFault", new InvalidDBSubnetStateExceptionUnmarshaller()); } exceptionUnmarshallers.add(new InvalidDBSubnetStateExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("CertificateNotFound") == null) { exceptionUnmarshallersMap.put("CertificateNotFound", new CertificateNotFoundExceptionUnmarshaller()); } exceptionUnmarshallers.add(new CertificateNotFoundExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("InvalidDBSecurityGroupState") == null) { exceptionUnmarshallersMap.put("InvalidDBSecurityGroupState", new InvalidDBSecurityGroupStateExceptionUnmarshaller()); } exceptionUnmarshallers.add(new InvalidDBSecurityGroupStateExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("InvalidDBClusterStateFault") == null) { exceptionUnmarshallersMap.put("InvalidDBClusterStateFault", new InvalidDBClusterStateExceptionUnmarshaller()); } exceptionUnmarshallers.add(new InvalidDBClusterStateExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBClusterAlreadyExistsFault") == null) { exceptionUnmarshallersMap.put("DBClusterAlreadyExistsFault", new DBClusterAlreadyExistsExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBClusterAlreadyExistsExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBSubnetQuotaExceededFault") == null) { exceptionUnmarshallersMap.put("DBSubnetQuotaExceededFault", new DBSubnetQuotaExceededExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBSubnetQuotaExceededExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("InvalidDBSnapshotState") == null) { exceptionUnmarshallersMap.put("InvalidDBSnapshotState", new InvalidDBSnapshotStateExceptionUnmarshaller()); } exceptionUnmarshallers.add(new InvalidDBSnapshotStateExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("InvalidVPCNetworkStateFault") == null) { exceptionUnmarshallersMap.put("InvalidVPCNetworkStateFault", new InvalidVPCNetworkStateExceptionUnmarshaller()); } exceptionUnmarshallers.add(new InvalidVPCNetworkStateExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("SNSTopicArnNotFound") == null) { exceptionUnmarshallersMap.put("SNSTopicArnNotFound", new SNSTopicArnNotFoundExceptionUnmarshaller()); } exceptionUnmarshallers.add(new SNSTopicArnNotFoundExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBSecurityGroupNotFound") == null) { exceptionUnmarshallersMap.put("DBSecurityGroupNotFound", new DBSecurityGroupNotFoundExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBSecurityGroupNotFoundExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBSubnetGroupQuotaExceeded") == null) { exceptionUnmarshallersMap.put("DBSubnetGroupQuotaExceeded", new DBSubnetGroupQuotaExceededExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBSubnetGroupQuotaExceededExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("ResourceNotFoundFault") == null) { exceptionUnmarshallersMap.put("ResourceNotFoundFault", new ResourceNotFoundExceptionUnmarshaller()); } exceptionUnmarshallers.add(new ResourceNotFoundExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("StorageTypeNotSupported") == null) { exceptionUnmarshallersMap.put("StorageTypeNotSupported", new StorageTypeNotSupportedExceptionUnmarshaller()); } exceptionUnmarshallers.add(new StorageTypeNotSupportedExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("InsufficientDBInstanceCapacity") == null) { exceptionUnmarshallersMap.put("InsufficientDBInstanceCapacity", new InsufficientDBInstanceCapacityExceptionUnmarshaller()); } exceptionUnmarshallers.add(new InsufficientDBInstanceCapacityExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBUpgradeDependencyFailure") == null) { exceptionUnmarshallersMap.put("DBUpgradeDependencyFailure", new DBUpgradeDependencyFailureExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBUpgradeDependencyFailureExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("SubscriptionAlreadyExist") == null) { exceptionUnmarshallersMap.put("SubscriptionAlreadyExist", new SubscriptionAlreadyExistExceptionUnmarshaller()); } exceptionUnmarshallers.add(new SubscriptionAlreadyExistExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("KMSKeyNotAccessibleFault") == null) { exceptionUnmarshallersMap.put("KMSKeyNotAccessibleFault", new KMSKeyNotAccessibleExceptionUnmarshaller()); } exceptionUnmarshallers.add(new KMSKeyNotAccessibleExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("SubscriptionNotFound") == null) { exceptionUnmarshallersMap.put("SubscriptionNotFound", new SubscriptionNotFoundExceptionUnmarshaller()); } exceptionUnmarshallers.add(new SubscriptionNotFoundExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBClusterQuotaExceededFault") == null) { exceptionUnmarshallersMap.put("DBClusterQuotaExceededFault", new DBClusterQuotaExceededExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBClusterQuotaExceededExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBClusterNotFoundFault") == null) { exceptionUnmarshallersMap.put("DBClusterNotFoundFault", new DBClusterNotFoundExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBClusterNotFoundExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBParameterGroupQuotaExceeded") == null) { exceptionUnmarshallersMap.put("DBParameterGroupQuotaExceeded", new DBParameterGroupQuotaExceededExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBParameterGroupQuotaExceededExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("InsufficientStorageClusterCapacity") == null) { exceptionUnmarshallersMap.put("InsufficientStorageClusterCapacity", new InsufficientStorageClusterCapacityExceptionUnmarshaller()); } exceptionUnmarshallers.add(new InsufficientStorageClusterCapacityExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("SubnetAlreadyInUse") == null) { exceptionUnmarshallersMap.put("SubnetAlreadyInUse", new SubnetAlreadyInUseExceptionUnmarshaller()); } exceptionUnmarshallers.add(new SubnetAlreadyInUseExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBClusterSnapshotAlreadyExistsFault") == null) { exceptionUnmarshallersMap.put("DBClusterSnapshotAlreadyExistsFault", new DBClusterSnapshotAlreadyExistsExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBClusterSnapshotAlreadyExistsExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("GlobalClusterNotFoundFault") == null) { exceptionUnmarshallersMap.put("GlobalClusterNotFoundFault", new GlobalClusterNotFoundExceptionUnmarshaller()); } exceptionUnmarshallers.add(new GlobalClusterNotFoundExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("InvalidDBClusterSnapshotStateFault") == null) { exceptionUnmarshallersMap.put("InvalidDBClusterSnapshotStateFault", new InvalidDBClusterSnapshotStateExceptionUnmarshaller()); } exceptionUnmarshallers.add(new InvalidDBClusterSnapshotStateExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("SourceNotFound") == null) { exceptionUnmarshallersMap.put("SourceNotFound", new SourceNotFoundExceptionUnmarshaller()); } exceptionUnmarshallers.add(new SourceNotFoundExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("InvalidEventSubscriptionState") == null) { exceptionUnmarshallersMap.put("InvalidEventSubscriptionState", new InvalidEventSubscriptionStateExceptionUnmarshaller()); } exceptionUnmarshallers.add(new InvalidEventSubscriptionStateExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBParameterGroupNotFound") == null) { exceptionUnmarshallersMap.put("DBParameterGroupNotFound", new DBParameterGroupNotFoundExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBParameterGroupNotFoundExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("InvalidDBParameterGroupState") == null) { exceptionUnmarshallersMap.put("InvalidDBParameterGroupState", new InvalidDBParameterGroupStateExceptionUnmarshaller()); } exceptionUnmarshallers.add(new InvalidDBParameterGroupStateExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("InvalidSubnet") == null) { exceptionUnmarshallersMap.put("InvalidSubnet", new InvalidSubnetExceptionUnmarshaller()); } exceptionUnmarshallers.add(new InvalidSubnetExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("EventSubscriptionQuotaExceeded") == null) { exceptionUnmarshallersMap.put("EventSubscriptionQuotaExceeded", new EventSubscriptionQuotaExceededExceptionUnmarshaller()); } exceptionUnmarshallers.add(new EventSubscriptionQuotaExceededExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("StorageQuotaExceeded") == null) { exceptionUnmarshallersMap.put("StorageQuotaExceeded", new StorageQuotaExceededExceptionUnmarshaller()); } exceptionUnmarshallers.add(new StorageQuotaExceededExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("DBSubnetGroupAlreadyExists") == null) { exceptionUnmarshallersMap.put("DBSubnetGroupAlreadyExists", new DBSubnetGroupAlreadyExistsExceptionUnmarshaller()); } exceptionUnmarshallers.add(new DBSubnetGroupAlreadyExistsExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("SNSNoAuthorization") == null) { exceptionUnmarshallersMap.put("SNSNoAuthorization", new SNSNoAuthorizationExceptionUnmarshaller()); } exceptionUnmarshallers.add(new SNSNoAuthorizationExceptionUnmarshaller()); if (exceptionUnmarshallersMap.get("AuthorizationNotFound") == null) { exceptionUnmarshallersMap.put("AuthorizationNotFound", new AuthorizationNotFoundExceptionUnmarshaller()); } exceptionUnmarshallers.add(new AuthorizationNotFoundExceptionUnmarshaller()); defaultUnmarshaller = new StandardErrorUnmarshaller(com.amazonaws.services.docdb.model.AmazonDocDBException.class); exceptionUnmarshallers.add(new StandardErrorUnmarshaller(com.amazonaws.services.docdb.model.AmazonDocDBException.class)); setServiceNameIntern(DEFAULT_SIGNING_NAME); setEndpointPrefix(ENDPOINT_PREFIX); // calling this.setEndPoint(...) will also modify the signer accordingly this.setEndpoint("rds.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/docdb/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/docdb/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *

* Adds a source identifier to an existing event notification subscription. *

* * @param addSourceIdentifierToSubscriptionRequest * Represents the input to AddSourceIdentifierToSubscription. * @return Result of the AddSourceIdentifierToSubscription operation returned by the service. * @throws SubscriptionNotFoundException * The subscription name does not exist. * @throws SourceNotFoundException * The requested source could not be found. * @sample AmazonDocDB.AddSourceIdentifierToSubscription * @see AWS API Documentation */ @Override public EventSubscription addSourceIdentifierToSubscription(AddSourceIdentifierToSubscriptionRequest request) { request = beforeClientExecution(request); return executeAddSourceIdentifierToSubscription(request); } @SdkInternalApi final EventSubscription executeAddSourceIdentifierToSubscription(AddSourceIdentifierToSubscriptionRequest addSourceIdentifierToSubscriptionRequest) { ExecutionContext executionContext = createExecutionContext(addSourceIdentifierToSubscriptionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new AddSourceIdentifierToSubscriptionRequestMarshaller().marshall(super.beforeMarshalling(addSourceIdentifierToSubscriptionRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AddSourceIdentifierToSubscription"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new EventSubscriptionStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Adds metadata tags to an Amazon DocumentDB resource. You can use these tags with cost allocation reporting to * track costs that are associated with Amazon DocumentDB resources or in a Condition statement in an * Identity and Access Management (IAM) policy for Amazon DocumentDB. *

* * @param addTagsToResourceRequest * Represents the input to AddTagsToResource. * @return Result of the AddTagsToResource operation returned by the service. * @throws DBInstanceNotFoundException * DBInstanceIdentifier doesn't refer to an existing instance. * @throws DBSnapshotNotFoundException * DBSnapshotIdentifier doesn't refer to an existing snapshot. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing cluster. * @sample AmazonDocDB.AddTagsToResource * @see AWS API * Documentation */ @Override public AddTagsToResourceResult addTagsToResource(AddTagsToResourceRequest request) { request = beforeClientExecution(request); return executeAddTagsToResource(request); } @SdkInternalApi final AddTagsToResourceResult executeAddTagsToResource(AddTagsToResourceRequest addTagsToResourceRequest) { ExecutionContext executionContext = createExecutionContext(addTagsToResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new AddTagsToResourceRequestMarshaller().marshall(super.beforeMarshalling(addTagsToResourceRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AddTagsToResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new AddTagsToResourceResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Applies a pending maintenance action to a resource (for example, to an Amazon DocumentDB instance). *

* * @param applyPendingMaintenanceActionRequest * Represents the input to ApplyPendingMaintenanceAction. * @return Result of the ApplyPendingMaintenanceAction operation returned by the service. * @throws ResourceNotFoundException * The specified resource ID was not found. * @throws InvalidDBClusterStateException * The cluster isn't in a valid state. * @throws InvalidDBInstanceStateException * The specified instance isn't in the available state. * @sample AmazonDocDB.ApplyPendingMaintenanceAction * @see AWS API Documentation */ @Override public ResourcePendingMaintenanceActions applyPendingMaintenanceAction(ApplyPendingMaintenanceActionRequest request) { request = beforeClientExecution(request); return executeApplyPendingMaintenanceAction(request); } @SdkInternalApi final ResourcePendingMaintenanceActions executeApplyPendingMaintenanceAction(ApplyPendingMaintenanceActionRequest applyPendingMaintenanceActionRequest) { ExecutionContext executionContext = createExecutionContext(applyPendingMaintenanceActionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ApplyPendingMaintenanceActionRequestMarshaller().marshall(super.beforeMarshalling(applyPendingMaintenanceActionRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ApplyPendingMaintenanceAction"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new ResourcePendingMaintenanceActionsStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Copies the specified cluster parameter group. *

* * @param copyDBClusterParameterGroupRequest * Represents the input to CopyDBClusterParameterGroup. * @return Result of the CopyDBClusterParameterGroup operation returned by the service. * @throws DBParameterGroupNotFoundException * DBParameterGroupName doesn't refer to an existing parameter group. * @throws DBParameterGroupQuotaExceededException * This request would cause you to exceed the allowed number of parameter groups. * @throws DBParameterGroupAlreadyExistsException * A parameter group with the same name already exists. * @sample AmazonDocDB.CopyDBClusterParameterGroup * @see AWS API Documentation */ @Override public DBClusterParameterGroup copyDBClusterParameterGroup(CopyDBClusterParameterGroupRequest request) { request = beforeClientExecution(request); return executeCopyDBClusterParameterGroup(request); } @SdkInternalApi final DBClusterParameterGroup executeCopyDBClusterParameterGroup(CopyDBClusterParameterGroupRequest copyDBClusterParameterGroupRequest) { ExecutionContext executionContext = createExecutionContext(copyDBClusterParameterGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CopyDBClusterParameterGroupRequestMarshaller().marshall(super.beforeMarshalling(copyDBClusterParameterGroupRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CopyDBClusterParameterGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DBClusterParameterGroupStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Copies a snapshot of a cluster. *

*

* To copy a cluster snapshot from a shared manual cluster snapshot, SourceDBClusterSnapshotIdentifier * must be the Amazon Resource Name (ARN) of the shared cluster snapshot. You can only copy a shared DB cluster * snapshot, whether encrypted or not, in the same Amazon Web Services Region. *

*

* To cancel the copy operation after it is in progress, delete the target cluster snapshot identified by * TargetDBClusterSnapshotIdentifier while that cluster snapshot is in the copying status. *

* * @param copyDBClusterSnapshotRequest * Represents the input to CopyDBClusterSnapshot. * @return Result of the CopyDBClusterSnapshot operation returned by the service. * @throws DBClusterSnapshotAlreadyExistsException * You already have a cluster snapshot with the given identifier. * @throws DBClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier doesn't refer to an existing cluster snapshot. * @throws InvalidDBClusterStateException * The cluster isn't in a valid state. * @throws InvalidDBClusterSnapshotStateException * The provided value isn't a valid cluster snapshot state. * @throws SnapshotQuotaExceededException * The request would cause you to exceed the allowed number of snapshots. * @throws KMSKeyNotAccessibleException * An error occurred when accessing an KMS key. * @sample AmazonDocDB.CopyDBClusterSnapshot * @see AWS * API Documentation */ @Override public DBClusterSnapshot copyDBClusterSnapshot(CopyDBClusterSnapshotRequest request) { request = beforeClientExecution(request); return executeCopyDBClusterSnapshot(request); } @SdkInternalApi final DBClusterSnapshot executeCopyDBClusterSnapshot(CopyDBClusterSnapshotRequest copyDBClusterSnapshotRequest) { ExecutionContext executionContext = createExecutionContext(copyDBClusterSnapshotRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CopyDBClusterSnapshotRequestMarshaller().marshall(super.beforeMarshalling(copyDBClusterSnapshotRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CopyDBClusterSnapshot"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new DBClusterSnapshotStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new Amazon DocumentDB cluster. *

* * @param createDBClusterRequest * Represents the input to CreateDBCluster. * @return Result of the CreateDBCluster operation returned by the service. * @throws DBClusterAlreadyExistsException * You already have a cluster with the given identifier. * @throws InsufficientStorageClusterCapacityException * There is not enough storage available for the current action. You might be able to resolve this error by * updating your subnet group to use different Availability Zones that have more storage available. * @throws DBClusterQuotaExceededException * The cluster can't be created because you have reached the maximum allowed quota of clusters. * @throws StorageQuotaExceededException * The request would cause you to exceed the allowed amount of storage available across all instances. * @throws DBSubnetGroupNotFoundException * DBSubnetGroupName doesn't refer to an existing subnet group. * @throws InvalidVPCNetworkStateException * The subnet group doesn't cover all Availability Zones after it is created because of changes that were * made. * @throws InvalidDBClusterStateException * The cluster isn't in a valid state. * @throws InvalidDBSubnetGroupStateException * The subnet group can't be deleted because it's in use. * @throws InvalidSubnetException * The requested subnet is not valid, or multiple subnets were requested that are not all in a common * virtual private cloud (VPC). * @throws InvalidDBInstanceStateException * The specified instance isn't in the available state. * @throws DBClusterParameterGroupNotFoundException * DBClusterParameterGroupName doesn't refer to an existing cluster parameter group. * @throws KMSKeyNotAccessibleException * An error occurred when accessing an KMS key. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing cluster. * @throws DBInstanceNotFoundException * DBInstanceIdentifier doesn't refer to an existing instance. * @throws DBSubnetGroupDoesNotCoverEnoughAZsException * Subnets in the subnet group should cover at least two Availability Zones unless there is only one * Availability Zone. * @throws GlobalClusterNotFoundException * The GlobalClusterIdentifier doesn't refer to an existing global cluster. * @throws InvalidGlobalClusterStateException * The requested operation can't be performed while the cluster is in this state. * @sample AmazonDocDB.CreateDBCluster * @see AWS API * Documentation */ @Override public DBCluster createDBCluster(CreateDBClusterRequest request) { request = beforeClientExecution(request); return executeCreateDBCluster(request); } @SdkInternalApi final DBCluster executeCreateDBCluster(CreateDBClusterRequest createDBClusterRequest) { ExecutionContext executionContext = createExecutionContext(createDBClusterRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateDBClusterRequestMarshaller().marshall(super.beforeMarshalling(createDBClusterRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDBCluster"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new DBClusterStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new cluster parameter group. *

*

* Parameters in a cluster parameter group apply to all of the instances in a cluster. *

*

* A cluster parameter group is initially created with the default parameters for the database engine used by * instances in the cluster. In Amazon DocumentDB, you cannot make modifications directly to the * default.docdb3.6 cluster parameter group. If your Amazon DocumentDB cluster is using the default * cluster parameter group and you want to modify a value in it, you must first create a * new parameter group or copy an * existing parameter group, modify it, and then apply the modified parameter group to your cluster. For the new * cluster parameter group and associated settings to take effect, you must then reboot the instances in the cluster * without failover. For more information, see * Modifying Amazon DocumentDB Cluster Parameter Groups. *

* * @param createDBClusterParameterGroupRequest * Represents the input of CreateDBClusterParameterGroup. * @return Result of the CreateDBClusterParameterGroup operation returned by the service. * @throws DBParameterGroupQuotaExceededException * This request would cause you to exceed the allowed number of parameter groups. * @throws DBParameterGroupAlreadyExistsException * A parameter group with the same name already exists. * @sample AmazonDocDB.CreateDBClusterParameterGroup * @see AWS API Documentation */ @Override public DBClusterParameterGroup createDBClusterParameterGroup(CreateDBClusterParameterGroupRequest request) { request = beforeClientExecution(request); return executeCreateDBClusterParameterGroup(request); } @SdkInternalApi final DBClusterParameterGroup executeCreateDBClusterParameterGroup(CreateDBClusterParameterGroupRequest createDBClusterParameterGroupRequest) { ExecutionContext executionContext = createExecutionContext(createDBClusterParameterGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateDBClusterParameterGroupRequestMarshaller().marshall(super.beforeMarshalling(createDBClusterParameterGroupRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDBClusterParameterGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DBClusterParameterGroupStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a snapshot of a cluster. *

* * @param createDBClusterSnapshotRequest * Represents the input of CreateDBClusterSnapshot. * @return Result of the CreateDBClusterSnapshot operation returned by the service. * @throws DBClusterSnapshotAlreadyExistsException * You already have a cluster snapshot with the given identifier. * @throws InvalidDBClusterStateException * The cluster isn't in a valid state. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing cluster. * @throws SnapshotQuotaExceededException * The request would cause you to exceed the allowed number of snapshots. * @throws InvalidDBClusterSnapshotStateException * The provided value isn't a valid cluster snapshot state. * @sample AmazonDocDB.CreateDBClusterSnapshot * @see AWS * API Documentation */ @Override public DBClusterSnapshot createDBClusterSnapshot(CreateDBClusterSnapshotRequest request) { request = beforeClientExecution(request); return executeCreateDBClusterSnapshot(request); } @SdkInternalApi final DBClusterSnapshot executeCreateDBClusterSnapshot(CreateDBClusterSnapshotRequest createDBClusterSnapshotRequest) { ExecutionContext executionContext = createExecutionContext(createDBClusterSnapshotRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateDBClusterSnapshotRequestMarshaller().marshall(super.beforeMarshalling(createDBClusterSnapshotRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDBClusterSnapshot"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new DBClusterSnapshotStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new instance. *

* * @param createDBInstanceRequest * Represents the input to CreateDBInstance. * @return Result of the CreateDBInstance operation returned by the service. * @throws DBInstanceAlreadyExistsException * You already have a instance with the given identifier. * @throws InsufficientDBInstanceCapacityException * The specified instance class isn't available in the specified Availability Zone. * @throws DBParameterGroupNotFoundException * DBParameterGroupName doesn't refer to an existing parameter group. * @throws DBSecurityGroupNotFoundException * DBSecurityGroupName doesn't refer to an existing security group. * @throws InstanceQuotaExceededException * The request would cause you to exceed the allowed number of instances. * @throws StorageQuotaExceededException * The request would cause you to exceed the allowed amount of storage available across all instances. * @throws DBSubnetGroupNotFoundException * DBSubnetGroupName doesn't refer to an existing subnet group. * @throws DBSubnetGroupDoesNotCoverEnoughAZsException * Subnets in the subnet group should cover at least two Availability Zones unless there is only one * Availability Zone. * @throws InvalidDBClusterStateException * The cluster isn't in a valid state. * @throws InvalidSubnetException * The requested subnet is not valid, or multiple subnets were requested that are not all in a common * virtual private cloud (VPC). * @throws InvalidVPCNetworkStateException * The subnet group doesn't cover all Availability Zones after it is created because of changes that were * made. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing cluster. * @throws StorageTypeNotSupportedException * Storage of the specified StorageType can't be associated with the DB instance. * @throws AuthorizationNotFoundException * The specified CIDR IP or Amazon EC2 security group isn't authorized for the specified security group.

*

* Amazon DocumentDB also might not be authorized to perform necessary actions on your behalf using IAM. * @throws KMSKeyNotAccessibleException * An error occurred when accessing an KMS key. * @sample AmazonDocDB.CreateDBInstance * @see AWS API * Documentation */ @Override public DBInstance createDBInstance(CreateDBInstanceRequest request) { request = beforeClientExecution(request); return executeCreateDBInstance(request); } @SdkInternalApi final DBInstance executeCreateDBInstance(CreateDBInstanceRequest createDBInstanceRequest) { ExecutionContext executionContext = createExecutionContext(createDBInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateDBInstanceRequestMarshaller().marshall(super.beforeMarshalling(createDBInstanceRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDBInstance"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new DBInstanceStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new subnet group. subnet groups must contain at least one subnet in at least two Availability Zones in * the Amazon Web Services Region. *

* * @param createDBSubnetGroupRequest * Represents the input to CreateDBSubnetGroup. * @return Result of the CreateDBSubnetGroup operation returned by the service. * @throws DBSubnetGroupAlreadyExistsException * DBSubnetGroupName is already being used by an existing subnet group. * @throws DBSubnetGroupQuotaExceededException * The request would cause you to exceed the allowed number of subnet groups. * @throws DBSubnetQuotaExceededException * The request would cause you to exceed the allowed number of subnets in a subnet group. * @throws DBSubnetGroupDoesNotCoverEnoughAZsException * Subnets in the subnet group should cover at least two Availability Zones unless there is only one * Availability Zone. * @throws InvalidSubnetException * The requested subnet is not valid, or multiple subnets were requested that are not all in a common * virtual private cloud (VPC). * @sample AmazonDocDB.CreateDBSubnetGroup * @see AWS API * Documentation */ @Override public DBSubnetGroup createDBSubnetGroup(CreateDBSubnetGroupRequest request) { request = beforeClientExecution(request); return executeCreateDBSubnetGroup(request); } @SdkInternalApi final DBSubnetGroup executeCreateDBSubnetGroup(CreateDBSubnetGroupRequest createDBSubnetGroupRequest) { ExecutionContext executionContext = createExecutionContext(createDBSubnetGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateDBSubnetGroupRequestMarshaller().marshall(super.beforeMarshalling(createDBSubnetGroupRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDBSubnetGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new DBSubnetGroupStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates an Amazon DocumentDB event notification subscription. This action requires a topic Amazon Resource Name * (ARN) created by using the Amazon DocumentDB console, the Amazon SNS console, or the Amazon SNS API. To obtain an * ARN with Amazon SNS, you must create a topic in Amazon SNS and subscribe to the topic. The ARN is displayed in * the Amazon SNS console. *

*

* You can specify the type of source (SourceType) that you want to be notified of. You can also * provide a list of Amazon DocumentDB sources (SourceIds) that trigger the events, and you can provide * a list of event categories (EventCategories) for events that you want to be notified of. For * example, you can specify SourceType = db-instance, * SourceIds = mydbinstance1, mydbinstance2 and EventCategories = Availability, Backup. *

*

* If you specify both the SourceType and SourceIds (such as * SourceType = db-instance and SourceIdentifier = myDBInstance1), you are notified of all * the db-instance events for the specified source. If you specify a SourceType but do not * specify a SourceIdentifier, you receive notice of the events for that source type for all your * Amazon DocumentDB sources. If you do not specify either the SourceType or the * SourceIdentifier, you are notified of events generated from all Amazon DocumentDB sources belonging * to your customer account. *

* * @param createEventSubscriptionRequest * Represents the input to CreateEventSubscription. * @return Result of the CreateEventSubscription operation returned by the service. * @throws EventSubscriptionQuotaExceededException * You have reached the maximum number of event subscriptions. * @throws SubscriptionAlreadyExistException * The provided subscription name already exists. * @throws SNSInvalidTopicException * Amazon SNS has responded that there is a problem with the specified topic. * @throws SNSNoAuthorizationException * You do not have permission to publish to the SNS topic Amazon Resource Name (ARN). * @throws SNSTopicArnNotFoundException * The SNS topic Amazon Resource Name (ARN) does not exist. * @throws SubscriptionCategoryNotFoundException * The provided category does not exist. * @throws SourceNotFoundException * The requested source could not be found. * @sample AmazonDocDB.CreateEventSubscription * @see AWS * API Documentation */ @Override public EventSubscription createEventSubscription(CreateEventSubscriptionRequest request) { request = beforeClientExecution(request); return executeCreateEventSubscription(request); } @SdkInternalApi final EventSubscription executeCreateEventSubscription(CreateEventSubscriptionRequest createEventSubscriptionRequest) { ExecutionContext executionContext = createExecutionContext(createEventSubscriptionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateEventSubscriptionRequestMarshaller().marshall(super.beforeMarshalling(createEventSubscriptionRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateEventSubscription"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new EventSubscriptionStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates an Amazon DocumentDB global cluster that can span multiple multiple Amazon Web Services Regions. The * global cluster contains one primary cluster with read-write capability, and up-to give read-only secondary * clusters. Global clusters uses storage-based fast replication across regions with latencies less than one second, * using dedicated infrastructure with no impact to your workload’s performance. *

*

*

* You can create a global cluster that is initially empty, and then add a primary and a secondary to it. Or you can * specify an existing cluster during the create operation, and this cluster becomes the primary of the global * cluster. *

* *

* This action only applies to Amazon DocumentDB clusters. *

*
* * @param createGlobalClusterRequest * Represents the input to CreateGlobalCluster. * @return Result of the CreateGlobalCluster operation returned by the service. * @throws GlobalClusterAlreadyExistsException * The GlobalClusterIdentifier already exists. Choose a new global cluster identifier (unique * name) to create a new global cluster. * @throws GlobalClusterQuotaExceededException * The number of global clusters for this account is already at the maximum allowed. * @throws InvalidDBClusterStateException * The cluster isn't in a valid state. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing cluster. * @sample AmazonDocDB.CreateGlobalCluster * @see AWS API * Documentation */ @Override public GlobalCluster createGlobalCluster(CreateGlobalClusterRequest request) { request = beforeClientExecution(request); return executeCreateGlobalCluster(request); } @SdkInternalApi final GlobalCluster executeCreateGlobalCluster(CreateGlobalClusterRequest createGlobalClusterRequest) { ExecutionContext executionContext = createExecutionContext(createGlobalClusterRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateGlobalClusterRequestMarshaller().marshall(super.beforeMarshalling(createGlobalClusterRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateGlobalCluster"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new GlobalClusterStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a previously provisioned cluster. When you delete a cluster, all automated backups for that cluster are * deleted and can't be recovered. Manual DB cluster snapshots of the specified cluster are not deleted. *

*

* * @param deleteDBClusterRequest * Represents the input to DeleteDBCluster. * @return Result of the DeleteDBCluster operation returned by the service. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing cluster. * @throws InvalidDBClusterStateException * The cluster isn't in a valid state. * @throws DBClusterSnapshotAlreadyExistsException * You already have a cluster snapshot with the given identifier. * @throws SnapshotQuotaExceededException * The request would cause you to exceed the allowed number of snapshots. * @throws InvalidDBClusterSnapshotStateException * The provided value isn't a valid cluster snapshot state. * @sample AmazonDocDB.DeleteDBCluster * @see AWS API * Documentation */ @Override public DBCluster deleteDBCluster(DeleteDBClusterRequest request) { request = beforeClientExecution(request); return executeDeleteDBCluster(request); } @SdkInternalApi final DBCluster executeDeleteDBCluster(DeleteDBClusterRequest deleteDBClusterRequest) { ExecutionContext executionContext = createExecutionContext(deleteDBClusterRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteDBClusterRequestMarshaller().marshall(super.beforeMarshalling(deleteDBClusterRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDBCluster"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new DBClusterStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a specified cluster parameter group. The cluster parameter group to be deleted can't be associated with * any clusters. *

* * @param deleteDBClusterParameterGroupRequest * Represents the input to DeleteDBClusterParameterGroup. * @return Result of the DeleteDBClusterParameterGroup operation returned by the service. * @throws InvalidDBParameterGroupStateException * The parameter group is in use, or it is in a state that is not valid. If you are trying to delete the * parameter group, you can't delete it when the parameter group is in this state. * @throws DBParameterGroupNotFoundException * DBParameterGroupName doesn't refer to an existing parameter group. * @sample AmazonDocDB.DeleteDBClusterParameterGroup * @see AWS API Documentation */ @Override public DeleteDBClusterParameterGroupResult deleteDBClusterParameterGroup(DeleteDBClusterParameterGroupRequest request) { request = beforeClientExecution(request); return executeDeleteDBClusterParameterGroup(request); } @SdkInternalApi final DeleteDBClusterParameterGroupResult executeDeleteDBClusterParameterGroup(DeleteDBClusterParameterGroupRequest deleteDBClusterParameterGroupRequest) { ExecutionContext executionContext = createExecutionContext(deleteDBClusterParameterGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteDBClusterParameterGroupRequestMarshaller().marshall(super.beforeMarshalling(deleteDBClusterParameterGroupRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDBClusterParameterGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DeleteDBClusterParameterGroupResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a cluster snapshot. If the snapshot is being copied, the copy operation is terminated. *

* *

* The cluster snapshot must be in the available state to be deleted. *

*
* * @param deleteDBClusterSnapshotRequest * Represents the input to DeleteDBClusterSnapshot. * @return Result of the DeleteDBClusterSnapshot operation returned by the service. * @throws InvalidDBClusterSnapshotStateException * The provided value isn't a valid cluster snapshot state. * @throws DBClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier doesn't refer to an existing cluster snapshot. * @sample AmazonDocDB.DeleteDBClusterSnapshot * @see AWS * API Documentation */ @Override public DBClusterSnapshot deleteDBClusterSnapshot(DeleteDBClusterSnapshotRequest request) { request = beforeClientExecution(request); return executeDeleteDBClusterSnapshot(request); } @SdkInternalApi final DBClusterSnapshot executeDeleteDBClusterSnapshot(DeleteDBClusterSnapshotRequest deleteDBClusterSnapshotRequest) { ExecutionContext executionContext = createExecutionContext(deleteDBClusterSnapshotRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteDBClusterSnapshotRequestMarshaller().marshall(super.beforeMarshalling(deleteDBClusterSnapshotRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDBClusterSnapshot"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new DBClusterSnapshotStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a previously provisioned instance. *

* * @param deleteDBInstanceRequest * Represents the input to DeleteDBInstance. * @return Result of the DeleteDBInstance operation returned by the service. * @throws DBInstanceNotFoundException * DBInstanceIdentifier doesn't refer to an existing instance. * @throws InvalidDBInstanceStateException * The specified instance isn't in the available state. * @throws DBSnapshotAlreadyExistsException * DBSnapshotIdentifier is already being used by an existing snapshot. * @throws SnapshotQuotaExceededException * The request would cause you to exceed the allowed number of snapshots. * @throws InvalidDBClusterStateException * The cluster isn't in a valid state. * @sample AmazonDocDB.DeleteDBInstance * @see AWS API * Documentation */ @Override public DBInstance deleteDBInstance(DeleteDBInstanceRequest request) { request = beforeClientExecution(request); return executeDeleteDBInstance(request); } @SdkInternalApi final DBInstance executeDeleteDBInstance(DeleteDBInstanceRequest deleteDBInstanceRequest) { ExecutionContext executionContext = createExecutionContext(deleteDBInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteDBInstanceRequestMarshaller().marshall(super.beforeMarshalling(deleteDBInstanceRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDBInstance"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new DBInstanceStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a subnet group. *

* *

* The specified database subnet group must not be associated with any DB instances. *

*
* * @param deleteDBSubnetGroupRequest * Represents the input to DeleteDBSubnetGroup. * @return Result of the DeleteDBSubnetGroup operation returned by the service. * @throws InvalidDBSubnetGroupStateException * The subnet group can't be deleted because it's in use. * @throws InvalidDBSubnetStateException * The subnet isn't in the available state. * @throws DBSubnetGroupNotFoundException * DBSubnetGroupName doesn't refer to an existing subnet group. * @sample AmazonDocDB.DeleteDBSubnetGroup * @see AWS API * Documentation */ @Override public DeleteDBSubnetGroupResult deleteDBSubnetGroup(DeleteDBSubnetGroupRequest request) { request = beforeClientExecution(request); return executeDeleteDBSubnetGroup(request); } @SdkInternalApi final DeleteDBSubnetGroupResult executeDeleteDBSubnetGroup(DeleteDBSubnetGroupRequest deleteDBSubnetGroupRequest) { ExecutionContext executionContext = createExecutionContext(deleteDBSubnetGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteDBSubnetGroupRequestMarshaller().marshall(super.beforeMarshalling(deleteDBSubnetGroupRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDBSubnetGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DeleteDBSubnetGroupResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes an Amazon DocumentDB event notification subscription. *

* * @param deleteEventSubscriptionRequest * Represents the input to DeleteEventSubscription. * @return Result of the DeleteEventSubscription operation returned by the service. * @throws SubscriptionNotFoundException * The subscription name does not exist. * @throws InvalidEventSubscriptionStateException * Someone else might be modifying a subscription. Wait a few seconds, and try again. * @sample AmazonDocDB.DeleteEventSubscription * @see AWS * API Documentation */ @Override public EventSubscription deleteEventSubscription(DeleteEventSubscriptionRequest request) { request = beforeClientExecution(request); return executeDeleteEventSubscription(request); } @SdkInternalApi final EventSubscription executeDeleteEventSubscription(DeleteEventSubscriptionRequest deleteEventSubscriptionRequest) { ExecutionContext executionContext = createExecutionContext(deleteEventSubscriptionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteEventSubscriptionRequestMarshaller().marshall(super.beforeMarshalling(deleteEventSubscriptionRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteEventSubscription"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new EventSubscriptionStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a global cluster. The primary and secondary clusters must already be detached or deleted before * attempting to delete a global cluster. *

* *

* This action only applies to Amazon DocumentDB clusters. *

*
* * @param deleteGlobalClusterRequest * Represents the input to DeleteGlobalCluster. * @return Result of the DeleteGlobalCluster operation returned by the service. * @throws GlobalClusterNotFoundException * The GlobalClusterIdentifier doesn't refer to an existing global cluster. * @throws InvalidGlobalClusterStateException * The requested operation can't be performed while the cluster is in this state. * @sample AmazonDocDB.DeleteGlobalCluster * @see AWS API * Documentation */ @Override public GlobalCluster deleteGlobalCluster(DeleteGlobalClusterRequest request) { request = beforeClientExecution(request); return executeDeleteGlobalCluster(request); } @SdkInternalApi final GlobalCluster executeDeleteGlobalCluster(DeleteGlobalClusterRequest deleteGlobalClusterRequest) { ExecutionContext executionContext = createExecutionContext(deleteGlobalClusterRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteGlobalClusterRequestMarshaller().marshall(super.beforeMarshalling(deleteGlobalClusterRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteGlobalCluster"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new GlobalClusterStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of certificate authority (CA) certificates provided by Amazon DocumentDB for this Amazon Web * Services account. *

* * @param describeCertificatesRequest * @return Result of the DescribeCertificates operation returned by the service. * @throws CertificateNotFoundException * CertificateIdentifier doesn't refer to an existing certificate. * @sample AmazonDocDB.DescribeCertificates * @see AWS API * Documentation */ @Override public DescribeCertificatesResult describeCertificates(DescribeCertificatesRequest request) { request = beforeClientExecution(request); return executeDescribeCertificates(request); } @SdkInternalApi final DescribeCertificatesResult executeDescribeCertificates(DescribeCertificatesRequest describeCertificatesRequest) { ExecutionContext executionContext = createExecutionContext(describeCertificatesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeCertificatesRequestMarshaller().marshall(super.beforeMarshalling(describeCertificatesRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeCertificates"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DescribeCertificatesResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of DBClusterParameterGroup descriptions. If a * DBClusterParameterGroupName parameter is specified, the list contains only the description of the * specified cluster parameter group. *

* * @param describeDBClusterParameterGroupsRequest * Represents the input to DescribeDBClusterParameterGroups. * @return Result of the DescribeDBClusterParameterGroups operation returned by the service. * @throws DBParameterGroupNotFoundException * DBParameterGroupName doesn't refer to an existing parameter group. * @sample AmazonDocDB.DescribeDBClusterParameterGroups * @see AWS API Documentation */ @Override public DescribeDBClusterParameterGroupsResult describeDBClusterParameterGroups(DescribeDBClusterParameterGroupsRequest request) { request = beforeClientExecution(request); return executeDescribeDBClusterParameterGroups(request); } @SdkInternalApi final DescribeDBClusterParameterGroupsResult executeDescribeDBClusterParameterGroups( DescribeDBClusterParameterGroupsRequest describeDBClusterParameterGroupsRequest) { ExecutionContext executionContext = createExecutionContext(describeDBClusterParameterGroupsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeDBClusterParameterGroupsRequestMarshaller().marshall(super.beforeMarshalling(describeDBClusterParameterGroupsRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDBClusterParameterGroups"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DescribeDBClusterParameterGroupsResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

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

* * @param describeDBClusterParametersRequest * Represents the input to DescribeDBClusterParameters. * @return Result of the DescribeDBClusterParameters operation returned by the service. * @throws DBParameterGroupNotFoundException * DBParameterGroupName doesn't refer to an existing parameter group. * @sample AmazonDocDB.DescribeDBClusterParameters * @see AWS API Documentation */ @Override public DescribeDBClusterParametersResult describeDBClusterParameters(DescribeDBClusterParametersRequest request) { request = beforeClientExecution(request); return executeDescribeDBClusterParameters(request); } @SdkInternalApi final DescribeDBClusterParametersResult executeDescribeDBClusterParameters(DescribeDBClusterParametersRequest describeDBClusterParametersRequest) { ExecutionContext executionContext = createExecutionContext(describeDBClusterParametersRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeDBClusterParametersRequestMarshaller().marshall(super.beforeMarshalling(describeDBClusterParametersRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDBClusterParameters"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DescribeDBClusterParametersResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of cluster snapshot attribute names and values for a manual DB cluster snapshot. *

*

* When you share snapshots with other Amazon Web Services accounts, * DescribeDBClusterSnapshotAttributes returns the restore attribute and a list of IDs for * the Amazon Web Services accounts that are authorized to copy or restore the manual cluster snapshot. If * all is included in the list of values for the restore attribute, then the manual * cluster snapshot is public and can be copied or restored by all Amazon Web Services accounts. *

* * @param describeDBClusterSnapshotAttributesRequest * Represents the input to DescribeDBClusterSnapshotAttributes. * @return Result of the DescribeDBClusterSnapshotAttributes operation returned by the service. * @throws DBClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier doesn't refer to an existing cluster snapshot. * @sample AmazonDocDB.DescribeDBClusterSnapshotAttributes * @see AWS API Documentation */ @Override public DBClusterSnapshotAttributesResult describeDBClusterSnapshotAttributes(DescribeDBClusterSnapshotAttributesRequest request) { request = beforeClientExecution(request); return executeDescribeDBClusterSnapshotAttributes(request); } @SdkInternalApi final DBClusterSnapshotAttributesResult executeDescribeDBClusterSnapshotAttributes( DescribeDBClusterSnapshotAttributesRequest describeDBClusterSnapshotAttributesRequest) { ExecutionContext executionContext = createExecutionContext(describeDBClusterSnapshotAttributesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeDBClusterSnapshotAttributesRequestMarshaller().marshall(super .beforeMarshalling(describeDBClusterSnapshotAttributesRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDBClusterSnapshotAttributes"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DBClusterSnapshotAttributesResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns information about cluster snapshots. This API operation supports pagination. *

* * @param describeDBClusterSnapshotsRequest * Represents the input to DescribeDBClusterSnapshots. * @return Result of the DescribeDBClusterSnapshots operation returned by the service. * @throws DBClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier doesn't refer to an existing cluster snapshot. * @sample AmazonDocDB.DescribeDBClusterSnapshots * @see AWS API Documentation */ @Override public DescribeDBClusterSnapshotsResult describeDBClusterSnapshots(DescribeDBClusterSnapshotsRequest request) { request = beforeClientExecution(request); return executeDescribeDBClusterSnapshots(request); } @SdkInternalApi final DescribeDBClusterSnapshotsResult executeDescribeDBClusterSnapshots(DescribeDBClusterSnapshotsRequest describeDBClusterSnapshotsRequest) { ExecutionContext executionContext = createExecutionContext(describeDBClusterSnapshotsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeDBClusterSnapshotsRequestMarshaller().marshall(super.beforeMarshalling(describeDBClusterSnapshotsRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDBClusterSnapshots"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DescribeDBClusterSnapshotsResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns information about provisioned Amazon DocumentDB clusters. This API operation supports pagination. For * certain management features such as cluster and instance lifecycle management, Amazon DocumentDB leverages * operational technology that is shared with Amazon RDS and Amazon Neptune. Use the * filterName=engine,Values=docdb filter parameter to return only Amazon DocumentDB clusters. *

* * @param describeDBClustersRequest * Represents the input to DescribeDBClusters. * @return Result of the DescribeDBClusters operation returned by the service. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing cluster. * @sample AmazonDocDB.DescribeDBClusters * @see AWS API * Documentation */ @Override public DescribeDBClustersResult describeDBClusters(DescribeDBClustersRequest request) { request = beforeClientExecution(request); return executeDescribeDBClusters(request); } @SdkInternalApi final DescribeDBClustersResult executeDescribeDBClusters(DescribeDBClustersRequest describeDBClustersRequest) { ExecutionContext executionContext = createExecutionContext(describeDBClustersRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeDBClustersRequestMarshaller().marshall(super.beforeMarshalling(describeDBClustersRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDBClusters"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DescribeDBClustersResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of the available engines. *

* * @param describeDBEngineVersionsRequest * Represents the input to DescribeDBEngineVersions. * @return Result of the DescribeDBEngineVersions operation returned by the service. * @sample AmazonDocDB.DescribeDBEngineVersions * @see AWS * API Documentation */ @Override public DescribeDBEngineVersionsResult describeDBEngineVersions(DescribeDBEngineVersionsRequest request) { request = beforeClientExecution(request); return executeDescribeDBEngineVersions(request); } @SdkInternalApi final DescribeDBEngineVersionsResult executeDescribeDBEngineVersions(DescribeDBEngineVersionsRequest describeDBEngineVersionsRequest) { ExecutionContext executionContext = createExecutionContext(describeDBEngineVersionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeDBEngineVersionsRequestMarshaller().marshall(super.beforeMarshalling(describeDBEngineVersionsRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDBEngineVersions"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DescribeDBEngineVersionsResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns information about provisioned Amazon DocumentDB instances. This API supports pagination. *

* * @param describeDBInstancesRequest * Represents the input to DescribeDBInstances. * @return Result of the DescribeDBInstances operation returned by the service. * @throws DBInstanceNotFoundException * DBInstanceIdentifier doesn't refer to an existing instance. * @sample AmazonDocDB.DescribeDBInstances * @see AWS API * Documentation */ @Override public DescribeDBInstancesResult describeDBInstances(DescribeDBInstancesRequest request) { request = beforeClientExecution(request); return executeDescribeDBInstances(request); } @SdkInternalApi final DescribeDBInstancesResult executeDescribeDBInstances(DescribeDBInstancesRequest describeDBInstancesRequest) { ExecutionContext executionContext = createExecutionContext(describeDBInstancesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeDBInstancesRequestMarshaller().marshall(super.beforeMarshalling(describeDBInstancesRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDBInstances"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DescribeDBInstancesResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is specified, the * list will contain only the descriptions of the specified DBSubnetGroup. *

* * @param describeDBSubnetGroupsRequest * Represents the input to DescribeDBSubnetGroups. * @return Result of the DescribeDBSubnetGroups operation returned by the service. * @throws DBSubnetGroupNotFoundException * DBSubnetGroupName doesn't refer to an existing subnet group. * @sample AmazonDocDB.DescribeDBSubnetGroups * @see AWS * API Documentation */ @Override public DescribeDBSubnetGroupsResult describeDBSubnetGroups(DescribeDBSubnetGroupsRequest request) { request = beforeClientExecution(request); return executeDescribeDBSubnetGroups(request); } @SdkInternalApi final DescribeDBSubnetGroupsResult executeDescribeDBSubnetGroups(DescribeDBSubnetGroupsRequest describeDBSubnetGroupsRequest) { ExecutionContext executionContext = createExecutionContext(describeDBSubnetGroupsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeDBSubnetGroupsRequestMarshaller().marshall(super.beforeMarshalling(describeDBSubnetGroupsRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDBSubnetGroups"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DescribeDBSubnetGroupsResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns the default engine and system parameter information for the cluster database engine. *

* * @param describeEngineDefaultClusterParametersRequest * Represents the input to DescribeEngineDefaultClusterParameters. * @return Result of the DescribeEngineDefaultClusterParameters operation returned by the service. * @sample AmazonDocDB.DescribeEngineDefaultClusterParameters * @see AWS API Documentation */ @Override public EngineDefaults describeEngineDefaultClusterParameters(DescribeEngineDefaultClusterParametersRequest request) { request = beforeClientExecution(request); return executeDescribeEngineDefaultClusterParameters(request); } @SdkInternalApi final EngineDefaults executeDescribeEngineDefaultClusterParameters( DescribeEngineDefaultClusterParametersRequest describeEngineDefaultClusterParametersRequest) { ExecutionContext executionContext = createExecutionContext(describeEngineDefaultClusterParametersRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeEngineDefaultClusterParametersRequestMarshaller().marshall(super .beforeMarshalling(describeEngineDefaultClusterParametersRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeEngineDefaultClusterParameters"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new EngineDefaultsStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Displays a list of categories for all event source types, or, if specified, for a specified source type. *

* * @param describeEventCategoriesRequest * Represents the input to DescribeEventCategories. * @return Result of the DescribeEventCategories operation returned by the service. * @sample AmazonDocDB.DescribeEventCategories * @see AWS * API Documentation */ @Override public DescribeEventCategoriesResult describeEventCategories(DescribeEventCategoriesRequest request) { request = beforeClientExecution(request); return executeDescribeEventCategories(request); } @SdkInternalApi final DescribeEventCategoriesResult executeDescribeEventCategories(DescribeEventCategoriesRequest describeEventCategoriesRequest) { ExecutionContext executionContext = createExecutionContext(describeEventCategoriesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeEventCategoriesRequestMarshaller().marshall(super.beforeMarshalling(describeEventCategoriesRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeEventCategories"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DescribeEventCategoriesResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists all the subscription descriptions for a customer account. The description for a subscription includes * SubscriptionName, SNSTopicARN, CustomerID, SourceType, * SourceID, CreationTime, and Status. *

*

* If you specify a SubscriptionName, lists the description for that subscription. *

* * @param describeEventSubscriptionsRequest * Represents the input to DescribeEventSubscriptions. * @return Result of the DescribeEventSubscriptions operation returned by the service. * @throws SubscriptionNotFoundException * The subscription name does not exist. * @sample AmazonDocDB.DescribeEventSubscriptions * @see AWS API Documentation */ @Override public DescribeEventSubscriptionsResult describeEventSubscriptions(DescribeEventSubscriptionsRequest request) { request = beforeClientExecution(request); return executeDescribeEventSubscriptions(request); } @SdkInternalApi final DescribeEventSubscriptionsResult executeDescribeEventSubscriptions(DescribeEventSubscriptionsRequest describeEventSubscriptionsRequest) { ExecutionContext executionContext = createExecutionContext(describeEventSubscriptionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeEventSubscriptionsRequestMarshaller().marshall(super.beforeMarshalling(describeEventSubscriptionsRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeEventSubscriptions"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DescribeEventSubscriptionsResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns events related to instances, security groups, snapshots, and DB parameter groups for the past 14 days. * You can obtain events specific to a particular DB instance, security group, snapshot, or parameter group by * providing the name as a parameter. By default, the events of the past hour are returned. *

* * @param describeEventsRequest * Represents the input to DescribeEvents. * @return Result of the DescribeEvents operation returned by the service. * @sample AmazonDocDB.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 DescribeEventsRequestMarshaller().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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeEvents"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DescribeEventsResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns information about Amazon DocumentDB global clusters. This API supports pagination. *

* *

* This action only applies to Amazon DocumentDB clusters. *

*
* * @param describeGlobalClustersRequest * @return Result of the DescribeGlobalClusters operation returned by the service. * @throws GlobalClusterNotFoundException * The GlobalClusterIdentifier doesn't refer to an existing global cluster. * @sample AmazonDocDB.DescribeGlobalClusters * @see AWS * API Documentation */ @Override public DescribeGlobalClustersResult describeGlobalClusters(DescribeGlobalClustersRequest request) { request = beforeClientExecution(request); return executeDescribeGlobalClusters(request); } @SdkInternalApi final DescribeGlobalClustersResult executeDescribeGlobalClusters(DescribeGlobalClustersRequest describeGlobalClustersRequest) { ExecutionContext executionContext = createExecutionContext(describeGlobalClustersRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeGlobalClustersRequestMarshaller().marshall(super.beforeMarshalling(describeGlobalClustersRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeGlobalClusters"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DescribeGlobalClustersResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of orderable instance options for the specified engine. *

* * @param describeOrderableDBInstanceOptionsRequest * Represents the input to DescribeOrderableDBInstanceOptions. * @return Result of the DescribeOrderableDBInstanceOptions operation returned by the service. * @sample AmazonDocDB.DescribeOrderableDBInstanceOptions * @see AWS API Documentation */ @Override public DescribeOrderableDBInstanceOptionsResult describeOrderableDBInstanceOptions(DescribeOrderableDBInstanceOptionsRequest request) { request = beforeClientExecution(request); return executeDescribeOrderableDBInstanceOptions(request); } @SdkInternalApi final DescribeOrderableDBInstanceOptionsResult executeDescribeOrderableDBInstanceOptions( DescribeOrderableDBInstanceOptionsRequest describeOrderableDBInstanceOptionsRequest) { ExecutionContext executionContext = createExecutionContext(describeOrderableDBInstanceOptionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeOrderableDBInstanceOptionsRequestMarshaller() .marshall(super.beforeMarshalling(describeOrderableDBInstanceOptionsRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeOrderableDBInstanceOptions"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DescribeOrderableDBInstanceOptionsResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of resources (for example, instances) that have at least one pending maintenance action. *

* * @param describePendingMaintenanceActionsRequest * Represents the input to DescribePendingMaintenanceActions. * @return Result of the DescribePendingMaintenanceActions operation returned by the service. * @throws ResourceNotFoundException * The specified resource ID was not found. * @sample AmazonDocDB.DescribePendingMaintenanceActions * @see AWS API Documentation */ @Override public DescribePendingMaintenanceActionsResult describePendingMaintenanceActions(DescribePendingMaintenanceActionsRequest request) { request = beforeClientExecution(request); return executeDescribePendingMaintenanceActions(request); } @SdkInternalApi final DescribePendingMaintenanceActionsResult executeDescribePendingMaintenanceActions( DescribePendingMaintenanceActionsRequest describePendingMaintenanceActionsRequest) { ExecutionContext executionContext = createExecutionContext(describePendingMaintenanceActionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribePendingMaintenanceActionsRequestMarshaller().marshall(super.beforeMarshalling(describePendingMaintenanceActionsRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribePendingMaintenanceActions"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DescribePendingMaintenanceActionsResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Forces a failover for a cluster. *

*

* A failover for a cluster promotes one of the Amazon DocumentDB replicas (read-only instances) in the cluster to * be the primary instance (the cluster writer). *

*

* If the primary instance fails, Amazon DocumentDB automatically fails over to an Amazon DocumentDB replica, if one * exists. You can force a failover when you want to simulate a failure of a primary instance for testing. *

* * @param failoverDBClusterRequest * Represents the input to FailoverDBCluster. * @return Result of the FailoverDBCluster operation returned by the service. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing cluster. * @throws InvalidDBClusterStateException * The cluster isn't in a valid state. * @throws InvalidDBInstanceStateException * The specified instance isn't in the available state. * @sample AmazonDocDB.FailoverDBCluster * @see AWS API * Documentation */ @Override public DBCluster failoverDBCluster(FailoverDBClusterRequest request) { request = beforeClientExecution(request); return executeFailoverDBCluster(request); } @SdkInternalApi final DBCluster executeFailoverDBCluster(FailoverDBClusterRequest failoverDBClusterRequest) { ExecutionContext executionContext = createExecutionContext(failoverDBClusterRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new FailoverDBClusterRequestMarshaller().marshall(super.beforeMarshalling(failoverDBClusterRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "FailoverDBCluster"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new DBClusterStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists all tags on an Amazon DocumentDB resource. *

* * @param listTagsForResourceRequest * Represents the input to ListTagsForResource. * @return Result of the ListTagsForResource operation returned by the service. * @throws DBInstanceNotFoundException * DBInstanceIdentifier doesn't refer to an existing instance. * @throws DBSnapshotNotFoundException * DBSnapshotIdentifier doesn't refer to an existing snapshot. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing cluster. * @sample AmazonDocDB.ListTagsForResource * @see AWS API * Documentation */ @Override public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request) { request = beforeClientExecution(request); return executeListTagsForResource(request); } @SdkInternalApi final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) { ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListTagsForResourceRequestMarshaller().marshall(super.beforeMarshalling(listTagsForResourceRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTagsForResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new ListTagsForResourceResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Modifies a setting for an Amazon DocumentDB cluster. You can change one or more database configuration parameters * by specifying these parameters and the new values in the request. *

* * @param modifyDBClusterRequest * Represents the input to ModifyDBCluster. * @return Result of the ModifyDBCluster operation returned by the service. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing cluster. * @throws InvalidDBClusterStateException * The cluster isn't in a valid state. * @throws StorageQuotaExceededException * The request would cause you to exceed the allowed amount of storage available across all instances. * @throws DBSubnetGroupNotFoundException * DBSubnetGroupName doesn't refer to an existing subnet group. * @throws InvalidVPCNetworkStateException * The subnet group doesn't cover all Availability Zones after it is created because of changes that were * made. * @throws InvalidDBSubnetGroupStateException * The subnet group can't be deleted because it's in use. * @throws InvalidSubnetException * The requested subnet is not valid, or multiple subnets were requested that are not all in a common * virtual private cloud (VPC). * @throws DBClusterParameterGroupNotFoundException * DBClusterParameterGroupName doesn't refer to an existing cluster parameter group. * @throws InvalidDBSecurityGroupStateException * The state of the security group doesn't allow deletion. * @throws InvalidDBInstanceStateException * The specified instance isn't in the available state. * @throws DBClusterAlreadyExistsException * You already have a cluster with the given identifier. * @sample AmazonDocDB.ModifyDBCluster * @see AWS API * Documentation */ @Override public DBCluster modifyDBCluster(ModifyDBClusterRequest request) { request = beforeClientExecution(request); return executeModifyDBCluster(request); } @SdkInternalApi final DBCluster executeModifyDBCluster(ModifyDBClusterRequest modifyDBClusterRequest) { ExecutionContext executionContext = createExecutionContext(modifyDBClusterRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ModifyDBClusterRequestMarshaller().marshall(super.beforeMarshalling(modifyDBClusterRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ModifyDBCluster"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new DBClusterStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Modifies the parameters of a cluster parameter group. To modify more than one parameter, submit a list of the * following: ParameterName, ParameterValue, and ApplyMethod. A maximum of 20 * parameters can be modified in a single request. *

* *

* Changes to dynamic parameters are applied immediately. Changes to static parameters require a reboot or * maintenance window before the change can take effect. *

*
*

* After you create a cluster parameter group, you should wait at least 5 minutes before creating your first cluster * that uses that cluster parameter group as the default parameter group. This allows Amazon DocumentDB to fully * complete the create action before the parameter group is used as the default for a new cluster. This step is * especially important for parameters that are critical when creating the default database for a cluster, such as * the character set for the default database defined by the character_set_database parameter. *

*
* * @param modifyDBClusterParameterGroupRequest * Represents the input to ModifyDBClusterParameterGroup. * @return Result of the ModifyDBClusterParameterGroup operation returned by the service. * @throws DBParameterGroupNotFoundException * DBParameterGroupName doesn't refer to an existing parameter group. * @throws InvalidDBParameterGroupStateException * The parameter group is in use, or it is in a state that is not valid. If you are trying to delete the * parameter group, you can't delete it when the parameter group is in this state. * @sample AmazonDocDB.ModifyDBClusterParameterGroup * @see AWS API Documentation */ @Override public ModifyDBClusterParameterGroupResult modifyDBClusterParameterGroup(ModifyDBClusterParameterGroupRequest request) { request = beforeClientExecution(request); return executeModifyDBClusterParameterGroup(request); } @SdkInternalApi final ModifyDBClusterParameterGroupResult executeModifyDBClusterParameterGroup(ModifyDBClusterParameterGroupRequest modifyDBClusterParameterGroupRequest) { ExecutionContext executionContext = createExecutionContext(modifyDBClusterParameterGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ModifyDBClusterParameterGroupRequestMarshaller().marshall(super.beforeMarshalling(modifyDBClusterParameterGroupRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ModifyDBClusterParameterGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new ModifyDBClusterParameterGroupResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Adds an attribute and values to, or removes an attribute and values from, a manual cluster snapshot. *

*

* To share a manual cluster snapshot with other Amazon Web Services accounts, specify restore as the * AttributeName, and use the ValuesToAdd parameter to add a list of IDs of the Amazon Web * Services accounts that are authorized to restore the manual cluster snapshot. Use the value all to * make the manual cluster snapshot public, which means that it can be copied or restored by all Amazon Web Services * accounts. Do not add the all value for any manual cluster snapshots that contain private information * that you don't want available to all Amazon Web Services accounts. If a manual cluster snapshot is encrypted, it * can be shared, but only by specifying a list of authorized Amazon Web Services account IDs for the * ValuesToAdd parameter. You can't use all as a value for that parameter in this case. *

* * @param modifyDBClusterSnapshotAttributeRequest * Represents the input to ModifyDBClusterSnapshotAttribute. * @return Result of the ModifyDBClusterSnapshotAttribute operation returned by the service. * @throws DBClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier doesn't refer to an existing cluster snapshot. * @throws InvalidDBClusterSnapshotStateException * The provided value isn't a valid cluster snapshot state. * @throws SharedSnapshotQuotaExceededException * You have exceeded the maximum number of accounts that you can share a manual DB snapshot with. * @sample AmazonDocDB.ModifyDBClusterSnapshotAttribute * @see AWS API Documentation */ @Override public DBClusterSnapshotAttributesResult modifyDBClusterSnapshotAttribute(ModifyDBClusterSnapshotAttributeRequest request) { request = beforeClientExecution(request); return executeModifyDBClusterSnapshotAttribute(request); } @SdkInternalApi final DBClusterSnapshotAttributesResult executeModifyDBClusterSnapshotAttribute( ModifyDBClusterSnapshotAttributeRequest modifyDBClusterSnapshotAttributeRequest) { ExecutionContext executionContext = createExecutionContext(modifyDBClusterSnapshotAttributeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ModifyDBClusterSnapshotAttributeRequestMarshaller().marshall(super.beforeMarshalling(modifyDBClusterSnapshotAttributeRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ModifyDBClusterSnapshotAttribute"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new DBClusterSnapshotAttributesResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Modifies settings for an instance. You can change one or more database configuration parameters by specifying * these parameters and the new values in the request. *

* * @param modifyDBInstanceRequest * Represents the input to ModifyDBInstance. * @return Result of the ModifyDBInstance operation returned by the service. * @throws InvalidDBInstanceStateException * The specified instance isn't in the available state. * @throws InvalidDBSecurityGroupStateException * The state of the security group doesn't allow deletion. * @throws DBInstanceAlreadyExistsException * You already have a instance with the given identifier. * @throws DBInstanceNotFoundException * DBInstanceIdentifier doesn't refer to an existing instance. * @throws DBSecurityGroupNotFoundException * DBSecurityGroupName doesn't refer to an existing security group. * @throws DBParameterGroupNotFoundException * DBParameterGroupName doesn't refer to an existing parameter group. * @throws InsufficientDBInstanceCapacityException * The specified instance class isn't available in the specified Availability Zone. * @throws StorageQuotaExceededException * The request would cause you to exceed the allowed amount of storage available across all instances. * @throws InvalidVPCNetworkStateException * The subnet group doesn't cover all Availability Zones after it is created because of changes that were * made. * @throws DBUpgradeDependencyFailureException * The upgrade failed because a resource that the depends on can't be modified. * @throws StorageTypeNotSupportedException * Storage of the specified StorageType can't be associated with the DB instance. * @throws AuthorizationNotFoundException * The specified CIDR IP or Amazon EC2 security group isn't authorized for the specified security group.

*

* Amazon DocumentDB also might not be authorized to perform necessary actions on your behalf using IAM. * @throws CertificateNotFoundException * CertificateIdentifier doesn't refer to an existing certificate. * @sample AmazonDocDB.ModifyDBInstance * @see AWS API * Documentation */ @Override public DBInstance modifyDBInstance(ModifyDBInstanceRequest request) { request = beforeClientExecution(request); return executeModifyDBInstance(request); } @SdkInternalApi final DBInstance executeModifyDBInstance(ModifyDBInstanceRequest modifyDBInstanceRequest) { ExecutionContext executionContext = createExecutionContext(modifyDBInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ModifyDBInstanceRequestMarshaller().marshall(super.beforeMarshalling(modifyDBInstanceRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ModifyDBInstance"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new DBInstanceStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Modifies an existing subnet group. subnet groups must contain at least one subnet in at least two Availability * Zones in the Amazon Web Services Region. *

* * @param modifyDBSubnetGroupRequest * Represents the input to ModifyDBSubnetGroup. * @return Result of the ModifyDBSubnetGroup operation returned by the service. * @throws DBSubnetGroupNotFoundException * DBSubnetGroupName doesn't refer to an existing subnet group. * @throws DBSubnetQuotaExceededException * The request would cause you to exceed the allowed number of subnets in a subnet group. * @throws SubnetAlreadyInUseException * The subnet is already in use in the Availability Zone. * @throws DBSubnetGroupDoesNotCoverEnoughAZsException * Subnets in the subnet group should cover at least two Availability Zones unless there is only one * Availability Zone. * @throws InvalidSubnetException * The requested subnet is not valid, or multiple subnets were requested that are not all in a common * virtual private cloud (VPC). * @sample AmazonDocDB.ModifyDBSubnetGroup * @see AWS API * Documentation */ @Override public DBSubnetGroup modifyDBSubnetGroup(ModifyDBSubnetGroupRequest request) { request = beforeClientExecution(request); return executeModifyDBSubnetGroup(request); } @SdkInternalApi final DBSubnetGroup executeModifyDBSubnetGroup(ModifyDBSubnetGroupRequest modifyDBSubnetGroupRequest) { ExecutionContext executionContext = createExecutionContext(modifyDBSubnetGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ModifyDBSubnetGroupRequestMarshaller().marshall(super.beforeMarshalling(modifyDBSubnetGroupRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ModifyDBSubnetGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new DBSubnetGroupStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Modifies an existing Amazon DocumentDB event notification subscription. *

* * @param modifyEventSubscriptionRequest * Represents the input to ModifyEventSubscription. * @return Result of the ModifyEventSubscription operation returned by the service. * @throws EventSubscriptionQuotaExceededException * You have reached the maximum number of event subscriptions. * @throws SubscriptionNotFoundException * The subscription name does not exist. * @throws SNSInvalidTopicException * Amazon SNS has responded that there is a problem with the specified topic. * @throws SNSNoAuthorizationException * You do not have permission to publish to the SNS topic Amazon Resource Name (ARN). * @throws SNSTopicArnNotFoundException * The SNS topic Amazon Resource Name (ARN) does not exist. * @throws SubscriptionCategoryNotFoundException * The provided category does not exist. * @sample AmazonDocDB.ModifyEventSubscription * @see AWS * API Documentation */ @Override public EventSubscription modifyEventSubscription(ModifyEventSubscriptionRequest request) { request = beforeClientExecution(request); return executeModifyEventSubscription(request); } @SdkInternalApi final EventSubscription executeModifyEventSubscription(ModifyEventSubscriptionRequest modifyEventSubscriptionRequest) { ExecutionContext executionContext = createExecutionContext(modifyEventSubscriptionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ModifyEventSubscriptionRequestMarshaller().marshall(super.beforeMarshalling(modifyEventSubscriptionRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ModifyEventSubscription"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new EventSubscriptionStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Modify a setting for an Amazon DocumentDB global cluster. You can change one or more configuration parameters * (for example: deletion protection), or the global cluster identifier by specifying these parameters and the new * values in the request. *

* *

* This action only applies to Amazon DocumentDB clusters. *

*
* * @param modifyGlobalClusterRequest * Represents the input to ModifyGlobalCluster. * @return Result of the ModifyGlobalCluster operation returned by the service. * @throws GlobalClusterNotFoundException * The GlobalClusterIdentifier doesn't refer to an existing global cluster. * @throws InvalidGlobalClusterStateException * The requested operation can't be performed while the cluster is in this state. * @sample AmazonDocDB.ModifyGlobalCluster * @see AWS API * Documentation */ @Override public GlobalCluster modifyGlobalCluster(ModifyGlobalClusterRequest request) { request = beforeClientExecution(request); return executeModifyGlobalCluster(request); } @SdkInternalApi final GlobalCluster executeModifyGlobalCluster(ModifyGlobalClusterRequest modifyGlobalClusterRequest) { ExecutionContext executionContext = createExecutionContext(modifyGlobalClusterRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ModifyGlobalClusterRequestMarshaller().marshall(super.beforeMarshalling(modifyGlobalClusterRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ModifyGlobalCluster"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new GlobalClusterStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* You might need to reboot your instance, usually for maintenance reasons. For example, if you make certain * changes, or if you change the cluster parameter group that is associated with the instance, you must reboot the * instance for the changes to take effect. *

*

* Rebooting an instance restarts the database engine service. Rebooting an instance results in a momentary outage, * during which the instance status is set to rebooting. *

* * @param rebootDBInstanceRequest * Represents the input to RebootDBInstance. * @return Result of the RebootDBInstance operation returned by the service. * @throws InvalidDBInstanceStateException * The specified instance isn't in the available state. * @throws DBInstanceNotFoundException * DBInstanceIdentifier doesn't refer to an existing instance. * @sample AmazonDocDB.RebootDBInstance * @see AWS API * Documentation */ @Override public DBInstance rebootDBInstance(RebootDBInstanceRequest request) { request = beforeClientExecution(request); return executeRebootDBInstance(request); } @SdkInternalApi final DBInstance executeRebootDBInstance(RebootDBInstanceRequest rebootDBInstanceRequest) { ExecutionContext executionContext = createExecutionContext(rebootDBInstanceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RebootDBInstanceRequestMarshaller().marshall(super.beforeMarshalling(rebootDBInstanceRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RebootDBInstance"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new DBInstanceStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Detaches an Amazon DocumentDB secondary cluster from a global cluster. The cluster becomes a standalone cluster * with read-write capability instead of being read-only and receiving data from a primary in a different region. *

* *

* This action only applies to Amazon DocumentDB clusters. *

*
* * @param removeFromGlobalClusterRequest * Represents the input to RemoveFromGlobalCluster. * @return Result of the RemoveFromGlobalCluster operation returned by the service. * @throws GlobalClusterNotFoundException * The GlobalClusterIdentifier doesn't refer to an existing global cluster. * @throws InvalidGlobalClusterStateException * The requested operation can't be performed while the cluster is in this state. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing cluster. * @sample AmazonDocDB.RemoveFromGlobalCluster * @see AWS * API Documentation */ @Override public GlobalCluster removeFromGlobalCluster(RemoveFromGlobalClusterRequest request) { request = beforeClientExecution(request); return executeRemoveFromGlobalCluster(request); } @SdkInternalApi final GlobalCluster executeRemoveFromGlobalCluster(RemoveFromGlobalClusterRequest removeFromGlobalClusterRequest) { ExecutionContext executionContext = createExecutionContext(removeFromGlobalClusterRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RemoveFromGlobalClusterRequestMarshaller().marshall(super.beforeMarshalling(removeFromGlobalClusterRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RemoveFromGlobalCluster"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new GlobalClusterStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes a source identifier from an existing Amazon DocumentDB event notification subscription. *

* * @param removeSourceIdentifierFromSubscriptionRequest * Represents the input to RemoveSourceIdentifierFromSubscription. * @return Result of the RemoveSourceIdentifierFromSubscription operation returned by the service. * @throws SubscriptionNotFoundException * The subscription name does not exist. * @throws SourceNotFoundException * The requested source could not be found. * @sample AmazonDocDB.RemoveSourceIdentifierFromSubscription * @see AWS API Documentation */ @Override public EventSubscription removeSourceIdentifierFromSubscription(RemoveSourceIdentifierFromSubscriptionRequest request) { request = beforeClientExecution(request); return executeRemoveSourceIdentifierFromSubscription(request); } @SdkInternalApi final EventSubscription executeRemoveSourceIdentifierFromSubscription( RemoveSourceIdentifierFromSubscriptionRequest removeSourceIdentifierFromSubscriptionRequest) { ExecutionContext executionContext = createExecutionContext(removeSourceIdentifierFromSubscriptionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RemoveSourceIdentifierFromSubscriptionRequestMarshaller().marshall(super .beforeMarshalling(removeSourceIdentifierFromSubscriptionRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RemoveSourceIdentifierFromSubscription"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new EventSubscriptionStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes metadata tags from an Amazon DocumentDB resource. *

* * @param removeTagsFromResourceRequest * Represents the input to RemoveTagsFromResource. * @return Result of the RemoveTagsFromResource operation returned by the service. * @throws DBInstanceNotFoundException * DBInstanceIdentifier doesn't refer to an existing instance. * @throws DBSnapshotNotFoundException * DBSnapshotIdentifier doesn't refer to an existing snapshot. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing cluster. * @sample AmazonDocDB.RemoveTagsFromResource * @see AWS * API Documentation */ @Override public RemoveTagsFromResourceResult removeTagsFromResource(RemoveTagsFromResourceRequest request) { request = beforeClientExecution(request); return executeRemoveTagsFromResource(request); } @SdkInternalApi final RemoveTagsFromResourceResult executeRemoveTagsFromResource(RemoveTagsFromResourceRequest removeTagsFromResourceRequest) { ExecutionContext executionContext = createExecutionContext(removeTagsFromResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RemoveTagsFromResourceRequestMarshaller().marshall(super.beforeMarshalling(removeTagsFromResourceRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RemoveTagsFromResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new RemoveTagsFromResourceResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Modifies the parameters of a cluster parameter group to the default value. To reset specific parameters, submit a * list of the following: ParameterName and ApplyMethod. To reset the entire cluster * parameter group, specify the DBClusterParameterGroupName and ResetAllParameters * parameters. *

*

* When you reset the entire group, dynamic parameters are updated immediately and static parameters are set to * pending-reboot to take effect on the next DB instance reboot. *

* * @param resetDBClusterParameterGroupRequest * Represents the input to ResetDBClusterParameterGroup. * @return Result of the ResetDBClusterParameterGroup operation returned by the service. * @throws InvalidDBParameterGroupStateException * The parameter group is in use, or it is in a state that is not valid. If you are trying to delete the * parameter group, you can't delete it when the parameter group is in this state. * @throws DBParameterGroupNotFoundException * DBParameterGroupName doesn't refer to an existing parameter group. * @sample AmazonDocDB.ResetDBClusterParameterGroup * @see AWS API Documentation */ @Override public ResetDBClusterParameterGroupResult resetDBClusterParameterGroup(ResetDBClusterParameterGroupRequest request) { request = beforeClientExecution(request); return executeResetDBClusterParameterGroup(request); } @SdkInternalApi final ResetDBClusterParameterGroupResult executeResetDBClusterParameterGroup(ResetDBClusterParameterGroupRequest resetDBClusterParameterGroupRequest) { ExecutionContext executionContext = createExecutionContext(resetDBClusterParameterGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ResetDBClusterParameterGroupRequestMarshaller().marshall(super.beforeMarshalling(resetDBClusterParameterGroupRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ResetDBClusterParameterGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler( new ResetDBClusterParameterGroupResultStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new cluster from a snapshot or cluster snapshot. *

*

* If a snapshot is specified, the target cluster is created from the source DB snapshot with a default * configuration and default security group. *

*

* If a cluster snapshot is specified, the target cluster is created from the source cluster restore point with the * same configuration as the original source DB cluster, except that the new cluster is created with the default * security group. *

* * @param restoreDBClusterFromSnapshotRequest * Represents the input to RestoreDBClusterFromSnapshot. * @return Result of the RestoreDBClusterFromSnapshot operation returned by the service. * @throws DBClusterAlreadyExistsException * You already have a cluster with the given identifier. * @throws DBClusterQuotaExceededException * The cluster can't be created because you have reached the maximum allowed quota of clusters. * @throws StorageQuotaExceededException * The request would cause you to exceed the allowed amount of storage available across all instances. * @throws DBSubnetGroupNotFoundException * DBSubnetGroupName doesn't refer to an existing subnet group. * @throws DBSnapshotNotFoundException * DBSnapshotIdentifier doesn't refer to an existing snapshot. * @throws DBClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier doesn't refer to an existing cluster snapshot. * @throws InsufficientDBClusterCapacityException * The cluster doesn't have enough capacity for the current operation. * @throws InsufficientStorageClusterCapacityException * There is not enough storage available for the current action. You might be able to resolve this error by * updating your subnet group to use different Availability Zones that have more storage available. * @throws InvalidDBSnapshotStateException * The state of the snapshot doesn't allow deletion. * @throws InvalidDBClusterSnapshotStateException * The provided value isn't a valid cluster snapshot state. * @throws StorageQuotaExceededException * The request would cause you to exceed the allowed amount of storage available across all instances. * @throws InvalidVPCNetworkStateException * The subnet group doesn't cover all Availability Zones after it is created because of changes that were * made. * @throws InvalidRestoreException * You cannot restore from a virtual private cloud (VPC) backup to a non-VPC DB instance. * @throws DBSubnetGroupNotFoundException * DBSubnetGroupName doesn't refer to an existing subnet group. * @throws InvalidSubnetException * The requested subnet is not valid, or multiple subnets were requested that are not all in a common * virtual private cloud (VPC). * @throws KMSKeyNotAccessibleException * An error occurred when accessing an KMS key. * @sample AmazonDocDB.RestoreDBClusterFromSnapshot * @see AWS API Documentation */ @Override public DBCluster restoreDBClusterFromSnapshot(RestoreDBClusterFromSnapshotRequest request) { request = beforeClientExecution(request); return executeRestoreDBClusterFromSnapshot(request); } @SdkInternalApi final DBCluster executeRestoreDBClusterFromSnapshot(RestoreDBClusterFromSnapshotRequest restoreDBClusterFromSnapshotRequest) { ExecutionContext executionContext = createExecutionContext(restoreDBClusterFromSnapshotRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RestoreDBClusterFromSnapshotRequestMarshaller().marshall(super.beforeMarshalling(restoreDBClusterFromSnapshotRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RestoreDBClusterFromSnapshot"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new DBClusterStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Restores a cluster to an arbitrary point in time. Users can restore to any point in time before * LatestRestorableTime for up to BackupRetentionPeriod days. The target cluster is * created from the source cluster with the same configuration as the original cluster, except that the new cluster * is created with the default security group. *

* * @param restoreDBClusterToPointInTimeRequest * Represents the input to RestoreDBClusterToPointInTime. * @return Result of the RestoreDBClusterToPointInTime operation returned by the service. * @throws DBClusterAlreadyExistsException * You already have a cluster with the given identifier. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing cluster. * @throws DBClusterQuotaExceededException * The cluster can't be created because you have reached the maximum allowed quota of clusters. * @throws DBClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier doesn't refer to an existing cluster snapshot. * @throws DBSubnetGroupNotFoundException * DBSubnetGroupName doesn't refer to an existing subnet group. * @throws InsufficientDBClusterCapacityException * The cluster doesn't have enough capacity for the current operation. * @throws InsufficientStorageClusterCapacityException * There is not enough storage available for the current action. You might be able to resolve this error by * updating your subnet group to use different Availability Zones that have more storage available. * @throws InvalidDBClusterSnapshotStateException * The provided value isn't a valid cluster snapshot state. * @throws InvalidDBClusterStateException * The cluster isn't in a valid state. * @throws InvalidDBSnapshotStateException * The state of the snapshot doesn't allow deletion. * @throws InvalidRestoreException * You cannot restore from a virtual private cloud (VPC) backup to a non-VPC DB instance. * @throws InvalidSubnetException * The requested subnet is not valid, or multiple subnets were requested that are not all in a common * virtual private cloud (VPC). * @throws InvalidVPCNetworkStateException * The subnet group doesn't cover all Availability Zones after it is created because of changes that were * made. * @throws KMSKeyNotAccessibleException * An error occurred when accessing an KMS key. * @throws StorageQuotaExceededException * The request would cause you to exceed the allowed amount of storage available across all instances. * @sample AmazonDocDB.RestoreDBClusterToPointInTime * @see AWS API Documentation */ @Override public DBCluster restoreDBClusterToPointInTime(RestoreDBClusterToPointInTimeRequest request) { request = beforeClientExecution(request); return executeRestoreDBClusterToPointInTime(request); } @SdkInternalApi final DBCluster executeRestoreDBClusterToPointInTime(RestoreDBClusterToPointInTimeRequest restoreDBClusterToPointInTimeRequest) { ExecutionContext executionContext = createExecutionContext(restoreDBClusterToPointInTimeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RestoreDBClusterToPointInTimeRequestMarshaller().marshall(super.beforeMarshalling(restoreDBClusterToPointInTimeRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RestoreDBClusterToPointInTime"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new DBClusterStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Restarts the stopped cluster that is specified by DBClusterIdentifier. For more information, see Stopping and * Starting an Amazon DocumentDB Cluster. *

* * @param startDBClusterRequest * @return Result of the StartDBCluster operation returned by the service. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing cluster. * @throws InvalidDBClusterStateException * The cluster isn't in a valid state. * @throws InvalidDBInstanceStateException * The specified instance isn't in the available state. * @sample AmazonDocDB.StartDBCluster * @see AWS API * Documentation */ @Override public DBCluster startDBCluster(StartDBClusterRequest request) { request = beforeClientExecution(request); return executeStartDBCluster(request); } @SdkInternalApi final DBCluster executeStartDBCluster(StartDBClusterRequest startDBClusterRequest) { ExecutionContext executionContext = createExecutionContext(startDBClusterRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartDBClusterRequestMarshaller().marshall(super.beforeMarshalling(startDBClusterRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartDBCluster"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new DBClusterStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Stops the running cluster that is specified by DBClusterIdentifier. The cluster must be in the * available state. For more information, see Stopping and * Starting an Amazon DocumentDB Cluster. *

* * @param stopDBClusterRequest * @return Result of the StopDBCluster operation returned by the service. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing cluster. * @throws InvalidDBClusterStateException * The cluster isn't in a valid state. * @throws InvalidDBInstanceStateException * The specified instance isn't in the available state. * @sample AmazonDocDB.StopDBCluster * @see AWS API * Documentation */ @Override public DBCluster stopDBCluster(StopDBClusterRequest request) { request = beforeClientExecution(request); return executeStopDBCluster(request); } @SdkInternalApi final DBCluster executeStopDBCluster(StopDBClusterRequest stopDBClusterRequest) { ExecutionContext executionContext = createExecutionContext(stopDBClusterRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StopDBClusterRequestMarshaller().marshall(super.beforeMarshalling(stopDBClusterRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopDBCluster"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new DBClusterStaxUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Switches over the specified secondary Amazon DocumentDB cluster to be the new primary Amazon DocumentDB cluster * in the global database cluster. *

* * @param switchoverGlobalClusterRequest * @return Result of the SwitchoverGlobalCluster operation returned by the service. * @throws GlobalClusterNotFoundException * The GlobalClusterIdentifier doesn't refer to an existing global cluster. * @throws InvalidGlobalClusterStateException * The requested operation can't be performed while the cluster is in this state. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing cluster. * @throws InvalidDBClusterStateException * The cluster isn't in a valid state. * @sample AmazonDocDB.SwitchoverGlobalCluster * @see AWS * API Documentation */ @Override public GlobalCluster switchoverGlobalCluster(SwitchoverGlobalClusterRequest request) { request = beforeClientExecution(request); return executeSwitchoverGlobalCluster(request); } @SdkInternalApi final GlobalCluster executeSwitchoverGlobalCluster(SwitchoverGlobalClusterRequest switchoverGlobalClusterRequest) { ExecutionContext executionContext = createExecutionContext(switchoverGlobalClusterRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new SwitchoverGlobalClusterRequestMarshaller().marshall(super.beforeMarshalling(switchoverGlobalClusterRequest)); // 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, "DocDB"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SwitchoverGlobalCluster"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } StaxResponseHandler responseHandler = new StaxResponseHandler(new GlobalClusterStaxUnmarshaller()); 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); DefaultErrorResponseHandler errorResponseHandler = new DefaultErrorResponseHandler(exceptionUnmarshallersMap, defaultUnmarshaller); return client.execute(request, responseHandler, errorResponseHandler, executionContext); } @Override public AmazonDocDBWaiters waiters() { if (waiters == null) { synchronized (this) { if (waiters == null) { waiters = new AmazonDocDBWaiters(this); } } } return waiters; } @Override public void shutdown() { super.shutdown(); if (waiters != null) { waiters.shutdown(); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy