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

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

/*
 * Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package 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 API documentation *

*/ @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; /** * List of exception unmarshallers for all modeled exceptions */ protected final List> exceptionUnmarshallers = new ArrayList>(); 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() { exceptionUnmarshallers.add(new DBSubnetGroupDoesNotCoverEnoughAZsExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBClusterSnapshotNotFoundExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBSubnetGroupNotFoundExceptionUnmarshaller()); exceptionUnmarshallers.add(new InstanceQuotaExceededExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBClusterParameterGroupNotFoundExceptionUnmarshaller()); exceptionUnmarshallers.add(new SnapshotQuotaExceededExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBInstanceNotFoundExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBSnapshotNotFoundExceptionUnmarshaller()); exceptionUnmarshallers.add(new InvalidRestoreExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBInstanceAlreadyExistsExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBSnapshotAlreadyExistsExceptionUnmarshaller()); exceptionUnmarshallers.add(new SharedSnapshotQuotaExceededExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBParameterGroupAlreadyExistsExceptionUnmarshaller()); exceptionUnmarshallers.add(new InvalidDBInstanceStateExceptionUnmarshaller()); exceptionUnmarshallers.add(new InvalidDBSubnetGroupStateExceptionUnmarshaller()); exceptionUnmarshallers.add(new InsufficientDBClusterCapacityExceptionUnmarshaller()); exceptionUnmarshallers.add(new InvalidDBSubnetStateExceptionUnmarshaller()); exceptionUnmarshallers.add(new CertificateNotFoundExceptionUnmarshaller()); exceptionUnmarshallers.add(new InvalidDBSecurityGroupStateExceptionUnmarshaller()); exceptionUnmarshallers.add(new InvalidDBClusterStateExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBClusterAlreadyExistsExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBSubnetQuotaExceededExceptionUnmarshaller()); exceptionUnmarshallers.add(new InvalidDBSnapshotStateExceptionUnmarshaller()); exceptionUnmarshallers.add(new InvalidVPCNetworkStateExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBSecurityGroupNotFoundExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBSubnetGroupQuotaExceededExceptionUnmarshaller()); exceptionUnmarshallers.add(new ResourceNotFoundExceptionUnmarshaller()); exceptionUnmarshallers.add(new StorageTypeNotSupportedExceptionUnmarshaller()); exceptionUnmarshallers.add(new InsufficientDBInstanceCapacityExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBUpgradeDependencyFailureExceptionUnmarshaller()); exceptionUnmarshallers.add(new KMSKeyNotAccessibleExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBClusterQuotaExceededExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBClusterNotFoundExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBParameterGroupQuotaExceededExceptionUnmarshaller()); exceptionUnmarshallers.add(new InsufficientStorageClusterCapacityExceptionUnmarshaller()); exceptionUnmarshallers.add(new SubnetAlreadyInUseExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBClusterSnapshotAlreadyExistsExceptionUnmarshaller()); exceptionUnmarshallers.add(new InvalidDBClusterSnapshotStateExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBParameterGroupNotFoundExceptionUnmarshaller()); exceptionUnmarshallers.add(new InvalidDBParameterGroupStateExceptionUnmarshaller()); exceptionUnmarshallers.add(new InvalidSubnetExceptionUnmarshaller()); exceptionUnmarshallers.add(new StorageQuotaExceededExceptionUnmarshaller()); exceptionUnmarshallers.add(new DBSubnetGroupAlreadyExistsExceptionUnmarshaller()); exceptionUnmarshallers.add(new AuthorizationNotFoundExceptionUnmarshaller()); 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 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 * AWS 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 DB instance. * @throws DBSnapshotNotFoundException * DBSnapshotIdentifier doesn't refer to an existing DB snapshot. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing DB 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.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 a DB 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 DB cluster isn't in a valid state. * @throws InvalidDBInstanceStateException * The specified DB 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.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 DB 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 DB parameter group. * @throws DBParameterGroupQuotaExceededException * This request would cause you to exceed the allowed number of DB parameter groups. * @throws DBParameterGroupAlreadyExistsException * A DB 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.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 DB cluster. *

*

* To copy a DB cluster snapshot from a shared manual DB cluster snapshot, * SourceDBClusterSnapshotIdentifier must be the Amazon Resource Name (ARN) of the shared DB cluster * snapshot. *

*

* To cancel the copy operation after it is in progress, delete the target DB cluster snapshot identified by * TargetDBClusterSnapshotIdentifier while that DB 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 DB cluster snapshot with the given identifier. * @throws DBClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. * @throws InvalidDBClusterStateException * The DB cluster isn't in a valid state. * @throws InvalidDBClusterSnapshotStateException * The provided value isn't a valid DB cluster snapshot state. * @throws SnapshotQuotaExceededException * The request would cause you to exceed the allowed number of DB snapshots. * @throws KMSKeyNotAccessibleException * An error occurred when accessing an AWS 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.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 DB cluster. *

* * @param createDBClusterRequest * Represents the input to CreateDBCluster. * @return Result of the CreateDBCluster operation returned by the service. * @throws DBClusterAlreadyExistsException * You already have a DB 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 DB cluster can't be created because you have reached the maximum allowed quota of DB clusters. * @throws StorageQuotaExceededException * The request would cause you to exceed the allowed amount of storage available across all DB instances. * @throws DBSubnetGroupNotFoundException * DBSubnetGroupName doesn't refer to an existing DB subnet group. * @throws InvalidVPCNetworkStateException * The DB subnet group doesn't cover all Availability Zones after it is created because of changes that were * made. * @throws InvalidDBClusterStateException * The DB cluster isn't in a valid state. * @throws InvalidDBSubnetGroupStateException * The DB 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 DB instance isn't in the available state. * @throws DBClusterParameterGroupNotFoundException * DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter group. * @throws KMSKeyNotAccessibleException * An error occurred when accessing an AWS KMS key. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing DB cluster. * @throws DBInstanceNotFoundException * DBInstanceIdentifier doesn't refer to an existing DB instance. * @throws DBSubnetGroupDoesNotCoverEnoughAZsException * Subnets in the DB subnet group should cover at least two Availability Zones unless there is only one * Availability Zone. * @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.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 DB cluster parameter group. *

*

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

*

* A DB cluster parameter group is initially created with the default parameters for the database engine used by * instances in the DB cluster. To provide custom values for any of the parameters, you must modify the group after * you create it. After you create a DB cluster parameter group, you must associate it with your DB cluster. For the * new DB cluster parameter group and associated settings to take effect, you must then reboot the DB instances in * the DB cluster without failover. *

* *

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

*
* * @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 DB parameter groups. * @throws DBParameterGroupAlreadyExistsException * A DB 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.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 DB cluster. *

* * @param createDBClusterSnapshotRequest * Represents the input of CreateDBClusterSnapshot. * @return Result of the CreateDBClusterSnapshot operation returned by the service. * @throws DBClusterSnapshotAlreadyExistsException * You already have a DB cluster snapshot with the given identifier. * @throws InvalidDBClusterStateException * The DB cluster isn't in a valid state. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing DB cluster. * @throws SnapshotQuotaExceededException * The request would cause you to exceed the allowed number of DB snapshots. * @throws InvalidDBClusterSnapshotStateException * The provided value isn't a valid DB 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.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 DB instance. *

* * @param createDBInstanceRequest * Represents the input to CreateDBInstance. * @return Result of the CreateDBInstance operation returned by the service. * @throws DBInstanceAlreadyExistsException * You already have a DB instance with the given identifier. * @throws InsufficientDBInstanceCapacityException * The specified DB instance class isn't available in the specified Availability Zone. * @throws DBParameterGroupNotFoundException * DBParameterGroupName doesn't refer to an existing DB parameter group. * @throws DBSecurityGroupNotFoundException * DBSecurityGroupName doesn't refer to an existing DB security group. * @throws InstanceQuotaExceededException * The request would cause you to exceed the allowed number of DB instances. * @throws StorageQuotaExceededException * The request would cause you to exceed the allowed amount of storage available across all DB instances. * @throws DBSubnetGroupNotFoundException * DBSubnetGroupName doesn't refer to an existing DB subnet group. * @throws DBSubnetGroupDoesNotCoverEnoughAZsException * Subnets in the DB subnet group should cover at least two Availability Zones unless there is only one * Availability Zone. * @throws InvalidDBClusterStateException * The DB 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 DB 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 DB 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 DB 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 AWS 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.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 DB subnet group. DB subnet groups must contain at least one subnet in at least two Availability * Zones in the AWS 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 DB subnet group. * @throws DBSubnetGroupQuotaExceededException * The request would cause you to exceed the allowed number of DB subnet groups. * @throws DBSubnetQuotaExceededException * The request would cause you to exceed the allowed number of subnets in a DB subnet group. * @throws DBSubnetGroupDoesNotCoverEnoughAZsException * Subnets in the DB 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.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); } } /** *

* Deletes a previously provisioned DB cluster. When you delete a DB cluster, all automated backups for that DB * cluster are deleted and can't be recovered. Manual DB cluster snapshots of the specified DB 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 DB cluster. * @throws InvalidDBClusterStateException * The DB cluster isn't in a valid state. * @throws DBClusterSnapshotAlreadyExistsException * You already have a DB cluster snapshot with the given identifier. * @throws SnapshotQuotaExceededException * The request would cause you to exceed the allowed number of DB snapshots. * @throws InvalidDBClusterSnapshotStateException * The provided value isn't a valid DB 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.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 DB cluster parameter group. The DB cluster parameter group to be deleted can't be associated * with any DB clusters. *

* * @param deleteDBClusterParameterGroupRequest * Represents the input to DeleteDBClusterParameterGroup. * @return Result of the DeleteDBClusterParameterGroup operation returned by the service. * @throws InvalidDBParameterGroupStateException * The DB 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 DB 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.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 DB cluster snapshot. If the snapshot is being copied, the copy operation is terminated. *

* *

* The DB 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 DB cluster snapshot state. * @throws DBClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier doesn't refer to an existing DB 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.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 DB 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 DB instance. * @throws InvalidDBInstanceStateException * The specified DB 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 DB snapshots. * @throws InvalidDBClusterStateException * The DB 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.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 DB 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 DB subnet group can't be deleted because it's in use. * @throws InvalidDBSubnetStateException * The DB subnet isn't in the available state. * @throws DBSubnetGroupNotFoundException * DBSubnetGroupName doesn't refer to an existing DB 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.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); } } /** *

* Returns a list of DBClusterParameterGroup descriptions. If a * DBClusterParameterGroupName parameter is specified, the list contains only the description of the * specified DB 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 DB 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.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 DB 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 DB 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.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 DB cluster snapshot attribute names and values for a manual DB cluster snapshot. *

*

* When you share snapshots with other AWS accounts, DescribeDBClusterSnapshotAttributes returns the * restore attribute and a list of IDs for the AWS accounts that are authorized to copy or restore the * manual DB cluster snapshot. If all is included in the list of values for the restore * attribute, then the manual DB cluster snapshot is public and can be copied or restored by all AWS 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 DB 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.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 DB 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 DB 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.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 DB clusters. This API operation supports pagination. *

* * @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 DB 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.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 DB 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.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 DB 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.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 DB 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.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.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.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); } } /** *

* Returns events related to DB instances, DB security groups, DB snapshots, and DB parameter groups for the past 14 * days. You can obtain events specific to a particular DB instance, DB security group, DB snapshot, or DB 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.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 a list of orderable DB 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.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, DB 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.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 DB cluster. *

*

* A failover for a DB cluster promotes one of the Amazon DocumentDB replicas (read-only instances) in the DB * 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 DB cluster. * @throws InvalidDBClusterStateException * The DB cluster isn't in a valid state. * @throws InvalidDBInstanceStateException * The specified DB 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.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 DB instance. * @throws DBSnapshotNotFoundException * DBSnapshotIdentifier doesn't refer to an existing DB snapshot. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing DB 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.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 DB 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 DB cluster. * @throws InvalidDBClusterStateException * The DB cluster isn't in a valid state. * @throws StorageQuotaExceededException * The request would cause you to exceed the allowed amount of storage available across all DB instances. * @throws DBSubnetGroupNotFoundException * DBSubnetGroupName doesn't refer to an existing DB subnet group. * @throws InvalidVPCNetworkStateException * The DB subnet group doesn't cover all Availability Zones after it is created because of changes that were * made. * @throws InvalidDBSubnetGroupStateException * The DB 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 DB cluster parameter group. * @throws InvalidDBSecurityGroupStateException * The state of the DB security group doesn't allow deletion. * @throws InvalidDBInstanceStateException * The specified DB instance isn't in the available state. * @throws DBClusterAlreadyExistsException * You already have a DB 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.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 DB 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 DB cluster parameter group, you should wait at least 5 minutes before creating your first DB * cluster that uses that DB 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 DB cluster. This * step is especially important for parameters that are critical when creating the default database for a DB * 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 DB parameter group. * @throws InvalidDBParameterGroupStateException * The DB 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.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 DB cluster snapshot. *

*

* To share a manual DB cluster snapshot with other AWS accounts, specify restore as the * AttributeName, and use the ValuesToAdd parameter to add a list of IDs of the AWS * accounts that are authorized to restore the manual DB cluster snapshot. Use the value all to make * the manual DB cluster snapshot public, which means that it can be copied or restored by all AWS accounts. Do not * add the all value for any manual DB cluster snapshots that contain private information that you * don't want available to all AWS accounts. If a manual DB cluster snapshot is encrypted, it can be shared, but * only by specifying a list of authorized AWS 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 DB cluster snapshot. * @throws InvalidDBClusterSnapshotStateException * The provided value isn't a valid DB 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.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 a DB 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 DB instance isn't in the available state. * @throws InvalidDBSecurityGroupStateException * The state of the DB security group doesn't allow deletion. * @throws DBInstanceAlreadyExistsException * You already have a DB instance with the given identifier. * @throws DBInstanceNotFoundException * DBInstanceIdentifier doesn't refer to an existing DB instance. * @throws DBSecurityGroupNotFoundException * DBSecurityGroupName doesn't refer to an existing DB security group. * @throws DBParameterGroupNotFoundException * DBParameterGroupName doesn't refer to an existing DB parameter group. * @throws InsufficientDBInstanceCapacityException * The specified DB 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 DB instances. * @throws InvalidVPCNetworkStateException * The DB subnet group doesn't cover all Availability Zones after it is created because of changes that were * made. * @throws DBUpgradeDependencyFailureException * The DB upgrade failed because a resource that the DB 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 DB 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.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 DB subnet group. DB subnet groups must contain at least one subnet in at least two * Availability Zones in the AWS 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 DB subnet group. * @throws DBSubnetQuotaExceededException * The request would cause you to exceed the allowed number of subnets in a DB subnet group. * @throws SubnetAlreadyInUseException * The DB subnet is already in use in the Availability Zone. * @throws DBSubnetGroupDoesNotCoverEnoughAZsException * Subnets in the DB 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.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); } } /** *

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

*

* Rebooting a DB instance restarts the database engine service. Rebooting a DB instance results in a momentary * outage, during which the DB 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 DB instance isn't in the available state. * @throws DBInstanceNotFoundException * DBInstanceIdentifier doesn't refer to an existing DB 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.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); } } /** *

* 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 DB instance. * @throws DBSnapshotNotFoundException * DBSnapshotIdentifier doesn't refer to an existing DB snapshot. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing DB 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.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 DB cluster parameter group to the default value. To reset specific parameters, * submit a list of the following: ParameterName and ApplyMethod. To reset the entire DB * 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 DB 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 DB 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.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 DB cluster from a DB snapshot or DB cluster snapshot. *

*

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

*

* If a DB cluster snapshot is specified, the target DB cluster is created from the source DB cluster restore point * with the same configuration as the original source DB cluster, except that the new DB 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 DB cluster with the given identifier. * @throws DBClusterQuotaExceededException * The DB cluster can't be created because you have reached the maximum allowed quota of DB clusters. * @throws StorageQuotaExceededException * The request would cause you to exceed the allowed amount of storage available across all DB instances. * @throws DBSubnetGroupNotFoundException * DBSubnetGroupName doesn't refer to an existing DB subnet group. * @throws DBSnapshotNotFoundException * DBSnapshotIdentifier doesn't refer to an existing DB snapshot. * @throws DBClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. * @throws InsufficientDBClusterCapacityException * The DB 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 DB snapshot doesn't allow deletion. * @throws InvalidDBClusterSnapshotStateException * The provided value isn't a valid DB cluster snapshot state. * @throws StorageQuotaExceededException * The request would cause you to exceed the allowed amount of storage available across all DB instances. * @throws InvalidVPCNetworkStateException * The DB 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 DB 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 AWS 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.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 DB cluster to an arbitrary point in time. Users can restore to any point in time before * LatestRestorableTime for up to BackupRetentionPeriod days. The target DB cluster is * created from the source DB cluster with the same configuration as the original DB cluster, except that the new DB * cluster is created with the default DB 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 DB cluster with the given identifier. * @throws DBClusterNotFoundException * DBClusterIdentifier doesn't refer to an existing DB cluster. * @throws DBClusterQuotaExceededException * The DB cluster can't be created because you have reached the maximum allowed quota of DB clusters. * @throws DBClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. * @throws DBSubnetGroupNotFoundException * DBSubnetGroupName doesn't refer to an existing DB subnet group. * @throws InsufficientDBClusterCapacityException * The DB 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 DB cluster snapshot state. * @throws InvalidDBClusterStateException * The DB cluster isn't in a valid state. * @throws InvalidDBSnapshotStateException * The state of the DB 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 DB 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 AWS KMS key. * @throws StorageQuotaExceededException * The request would cause you to exceed the allowed amount of storage available across all DB 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.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 DB cluster. * @throws InvalidDBClusterStateException * The DB cluster isn't in a valid state. * @throws InvalidDBInstanceStateException * The specified DB 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.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 DB cluster. * @throws InvalidDBClusterStateException * The DB cluster isn't in a valid state. * @throws InvalidDBInstanceStateException * The specified DB 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.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); } } /** * 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(exceptionUnmarshallers); 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 - 2025 Weber Informatics LLC | Privacy Policy