software.amazon.awssdk.services.neptune.DefaultNeptuneAsyncClient Maven / Gradle / Ivy
Show all versions of neptune Show documentation
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.neptune;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ScheduledExecutorService;
import java.util.function.Consumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.client.handler.AwsAsyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.awscore.internal.AwsProtocolMetadata;
import software.amazon.awssdk.awscore.internal.AwsServiceProtocol;
import software.amazon.awssdk.awscore.retry.AwsRetryStrategy;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkPlugin;
import software.amazon.awssdk.core.SdkRequest;
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.AsyncClientHandler;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.retry.RetryMode;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.query.AwsQueryProtocolFactory;
import software.amazon.awssdk.retries.api.RetryStrategy;
import software.amazon.awssdk.services.neptune.internal.NeptuneServiceClientConfigurationBuilder;
import software.amazon.awssdk.services.neptune.model.AddRoleToDbClusterRequest;
import software.amazon.awssdk.services.neptune.model.AddRoleToDbClusterResponse;
import software.amazon.awssdk.services.neptune.model.AddSourceIdentifierToSubscriptionRequest;
import software.amazon.awssdk.services.neptune.model.AddSourceIdentifierToSubscriptionResponse;
import software.amazon.awssdk.services.neptune.model.AddTagsToResourceRequest;
import software.amazon.awssdk.services.neptune.model.AddTagsToResourceResponse;
import software.amazon.awssdk.services.neptune.model.ApplyPendingMaintenanceActionRequest;
import software.amazon.awssdk.services.neptune.model.ApplyPendingMaintenanceActionResponse;
import software.amazon.awssdk.services.neptune.model.AuthorizationNotFoundException;
import software.amazon.awssdk.services.neptune.model.CertificateNotFoundException;
import software.amazon.awssdk.services.neptune.model.CopyDbClusterParameterGroupRequest;
import software.amazon.awssdk.services.neptune.model.CopyDbClusterParameterGroupResponse;
import software.amazon.awssdk.services.neptune.model.CopyDbClusterSnapshotRequest;
import software.amazon.awssdk.services.neptune.model.CopyDbClusterSnapshotResponse;
import software.amazon.awssdk.services.neptune.model.CopyDbParameterGroupRequest;
import software.amazon.awssdk.services.neptune.model.CopyDbParameterGroupResponse;
import software.amazon.awssdk.services.neptune.model.CreateDbClusterEndpointRequest;
import software.amazon.awssdk.services.neptune.model.CreateDbClusterEndpointResponse;
import software.amazon.awssdk.services.neptune.model.CreateDbClusterParameterGroupRequest;
import software.amazon.awssdk.services.neptune.model.CreateDbClusterParameterGroupResponse;
import software.amazon.awssdk.services.neptune.model.CreateDbClusterRequest;
import software.amazon.awssdk.services.neptune.model.CreateDbClusterResponse;
import software.amazon.awssdk.services.neptune.model.CreateDbClusterSnapshotRequest;
import software.amazon.awssdk.services.neptune.model.CreateDbClusterSnapshotResponse;
import software.amazon.awssdk.services.neptune.model.CreateDbInstanceRequest;
import software.amazon.awssdk.services.neptune.model.CreateDbInstanceResponse;
import software.amazon.awssdk.services.neptune.model.CreateDbParameterGroupRequest;
import software.amazon.awssdk.services.neptune.model.CreateDbParameterGroupResponse;
import software.amazon.awssdk.services.neptune.model.CreateDbSubnetGroupRequest;
import software.amazon.awssdk.services.neptune.model.CreateDbSubnetGroupResponse;
import software.amazon.awssdk.services.neptune.model.CreateEventSubscriptionRequest;
import software.amazon.awssdk.services.neptune.model.CreateEventSubscriptionResponse;
import software.amazon.awssdk.services.neptune.model.CreateGlobalClusterRequest;
import software.amazon.awssdk.services.neptune.model.CreateGlobalClusterResponse;
import software.amazon.awssdk.services.neptune.model.DbClusterAlreadyExistsException;
import software.amazon.awssdk.services.neptune.model.DbClusterEndpointAlreadyExistsException;
import software.amazon.awssdk.services.neptune.model.DbClusterEndpointNotFoundException;
import software.amazon.awssdk.services.neptune.model.DbClusterEndpointQuotaExceededException;
import software.amazon.awssdk.services.neptune.model.DbClusterNotFoundException;
import software.amazon.awssdk.services.neptune.model.DbClusterParameterGroupNotFoundException;
import software.amazon.awssdk.services.neptune.model.DbClusterQuotaExceededException;
import software.amazon.awssdk.services.neptune.model.DbClusterRoleAlreadyExistsException;
import software.amazon.awssdk.services.neptune.model.DbClusterRoleNotFoundException;
import software.amazon.awssdk.services.neptune.model.DbClusterRoleQuotaExceededException;
import software.amazon.awssdk.services.neptune.model.DbClusterSnapshotAlreadyExistsException;
import software.amazon.awssdk.services.neptune.model.DbClusterSnapshotNotFoundException;
import software.amazon.awssdk.services.neptune.model.DbInstanceAlreadyExistsException;
import software.amazon.awssdk.services.neptune.model.DbInstanceNotFoundException;
import software.amazon.awssdk.services.neptune.model.DbParameterGroupAlreadyExistsException;
import software.amazon.awssdk.services.neptune.model.DbParameterGroupNotFoundException;
import software.amazon.awssdk.services.neptune.model.DbParameterGroupQuotaExceededException;
import software.amazon.awssdk.services.neptune.model.DbSecurityGroupNotFoundException;
import software.amazon.awssdk.services.neptune.model.DbSnapshotAlreadyExistsException;
import software.amazon.awssdk.services.neptune.model.DbSnapshotNotFoundException;
import software.amazon.awssdk.services.neptune.model.DbSubnetGroupAlreadyExistsException;
import software.amazon.awssdk.services.neptune.model.DbSubnetGroupDoesNotCoverEnoughAZsException;
import software.amazon.awssdk.services.neptune.model.DbSubnetGroupNotFoundException;
import software.amazon.awssdk.services.neptune.model.DbSubnetGroupQuotaExceededException;
import software.amazon.awssdk.services.neptune.model.DbSubnetQuotaExceededException;
import software.amazon.awssdk.services.neptune.model.DbUpgradeDependencyFailureException;
import software.amazon.awssdk.services.neptune.model.DeleteDbClusterEndpointRequest;
import software.amazon.awssdk.services.neptune.model.DeleteDbClusterEndpointResponse;
import software.amazon.awssdk.services.neptune.model.DeleteDbClusterParameterGroupRequest;
import software.amazon.awssdk.services.neptune.model.DeleteDbClusterParameterGroupResponse;
import software.amazon.awssdk.services.neptune.model.DeleteDbClusterRequest;
import software.amazon.awssdk.services.neptune.model.DeleteDbClusterResponse;
import software.amazon.awssdk.services.neptune.model.DeleteDbClusterSnapshotRequest;
import software.amazon.awssdk.services.neptune.model.DeleteDbClusterSnapshotResponse;
import software.amazon.awssdk.services.neptune.model.DeleteDbInstanceRequest;
import software.amazon.awssdk.services.neptune.model.DeleteDbInstanceResponse;
import software.amazon.awssdk.services.neptune.model.DeleteDbParameterGroupRequest;
import software.amazon.awssdk.services.neptune.model.DeleteDbParameterGroupResponse;
import software.amazon.awssdk.services.neptune.model.DeleteDbSubnetGroupRequest;
import software.amazon.awssdk.services.neptune.model.DeleteDbSubnetGroupResponse;
import software.amazon.awssdk.services.neptune.model.DeleteEventSubscriptionRequest;
import software.amazon.awssdk.services.neptune.model.DeleteEventSubscriptionResponse;
import software.amazon.awssdk.services.neptune.model.DeleteGlobalClusterRequest;
import software.amazon.awssdk.services.neptune.model.DeleteGlobalClusterResponse;
import software.amazon.awssdk.services.neptune.model.DescribeDbClusterEndpointsRequest;
import software.amazon.awssdk.services.neptune.model.DescribeDbClusterEndpointsResponse;
import software.amazon.awssdk.services.neptune.model.DescribeDbClusterParameterGroupsRequest;
import software.amazon.awssdk.services.neptune.model.DescribeDbClusterParameterGroupsResponse;
import software.amazon.awssdk.services.neptune.model.DescribeDbClusterParametersRequest;
import software.amazon.awssdk.services.neptune.model.DescribeDbClusterParametersResponse;
import software.amazon.awssdk.services.neptune.model.DescribeDbClusterSnapshotAttributesRequest;
import software.amazon.awssdk.services.neptune.model.DescribeDbClusterSnapshotAttributesResponse;
import software.amazon.awssdk.services.neptune.model.DescribeDbClusterSnapshotsRequest;
import software.amazon.awssdk.services.neptune.model.DescribeDbClusterSnapshotsResponse;
import software.amazon.awssdk.services.neptune.model.DescribeDbClustersRequest;
import software.amazon.awssdk.services.neptune.model.DescribeDbClustersResponse;
import software.amazon.awssdk.services.neptune.model.DescribeDbEngineVersionsRequest;
import software.amazon.awssdk.services.neptune.model.DescribeDbEngineVersionsResponse;
import software.amazon.awssdk.services.neptune.model.DescribeDbInstancesRequest;
import software.amazon.awssdk.services.neptune.model.DescribeDbInstancesResponse;
import software.amazon.awssdk.services.neptune.model.DescribeDbParameterGroupsRequest;
import software.amazon.awssdk.services.neptune.model.DescribeDbParameterGroupsResponse;
import software.amazon.awssdk.services.neptune.model.DescribeDbParametersRequest;
import software.amazon.awssdk.services.neptune.model.DescribeDbParametersResponse;
import software.amazon.awssdk.services.neptune.model.DescribeDbSubnetGroupsRequest;
import software.amazon.awssdk.services.neptune.model.DescribeDbSubnetGroupsResponse;
import software.amazon.awssdk.services.neptune.model.DescribeEngineDefaultClusterParametersRequest;
import software.amazon.awssdk.services.neptune.model.DescribeEngineDefaultClusterParametersResponse;
import software.amazon.awssdk.services.neptune.model.DescribeEngineDefaultParametersRequest;
import software.amazon.awssdk.services.neptune.model.DescribeEngineDefaultParametersResponse;
import software.amazon.awssdk.services.neptune.model.DescribeEventCategoriesRequest;
import software.amazon.awssdk.services.neptune.model.DescribeEventCategoriesResponse;
import software.amazon.awssdk.services.neptune.model.DescribeEventSubscriptionsRequest;
import software.amazon.awssdk.services.neptune.model.DescribeEventSubscriptionsResponse;
import software.amazon.awssdk.services.neptune.model.DescribeEventsRequest;
import software.amazon.awssdk.services.neptune.model.DescribeEventsResponse;
import software.amazon.awssdk.services.neptune.model.DescribeGlobalClustersRequest;
import software.amazon.awssdk.services.neptune.model.DescribeGlobalClustersResponse;
import software.amazon.awssdk.services.neptune.model.DescribeOrderableDbInstanceOptionsRequest;
import software.amazon.awssdk.services.neptune.model.DescribeOrderableDbInstanceOptionsResponse;
import software.amazon.awssdk.services.neptune.model.DescribePendingMaintenanceActionsRequest;
import software.amazon.awssdk.services.neptune.model.DescribePendingMaintenanceActionsResponse;
import software.amazon.awssdk.services.neptune.model.DescribeValidDbInstanceModificationsRequest;
import software.amazon.awssdk.services.neptune.model.DescribeValidDbInstanceModificationsResponse;
import software.amazon.awssdk.services.neptune.model.DomainNotFoundException;
import software.amazon.awssdk.services.neptune.model.EventSubscriptionQuotaExceededException;
import software.amazon.awssdk.services.neptune.model.FailoverDbClusterRequest;
import software.amazon.awssdk.services.neptune.model.FailoverDbClusterResponse;
import software.amazon.awssdk.services.neptune.model.FailoverGlobalClusterRequest;
import software.amazon.awssdk.services.neptune.model.FailoverGlobalClusterResponse;
import software.amazon.awssdk.services.neptune.model.GlobalClusterAlreadyExistsException;
import software.amazon.awssdk.services.neptune.model.GlobalClusterNotFoundException;
import software.amazon.awssdk.services.neptune.model.GlobalClusterQuotaExceededException;
import software.amazon.awssdk.services.neptune.model.InstanceQuotaExceededException;
import software.amazon.awssdk.services.neptune.model.InsufficientDbClusterCapacityException;
import software.amazon.awssdk.services.neptune.model.InsufficientDbInstanceCapacityException;
import software.amazon.awssdk.services.neptune.model.InsufficientStorageClusterCapacityException;
import software.amazon.awssdk.services.neptune.model.InvalidDbClusterEndpointStateException;
import software.amazon.awssdk.services.neptune.model.InvalidDbClusterSnapshotStateException;
import software.amazon.awssdk.services.neptune.model.InvalidDbClusterStateException;
import software.amazon.awssdk.services.neptune.model.InvalidDbInstanceStateException;
import software.amazon.awssdk.services.neptune.model.InvalidDbParameterGroupStateException;
import software.amazon.awssdk.services.neptune.model.InvalidDbSecurityGroupStateException;
import software.amazon.awssdk.services.neptune.model.InvalidDbSnapshotStateException;
import software.amazon.awssdk.services.neptune.model.InvalidDbSubnetGroupStateException;
import software.amazon.awssdk.services.neptune.model.InvalidDbSubnetStateException;
import software.amazon.awssdk.services.neptune.model.InvalidEventSubscriptionStateException;
import software.amazon.awssdk.services.neptune.model.InvalidGlobalClusterStateException;
import software.amazon.awssdk.services.neptune.model.InvalidRestoreException;
import software.amazon.awssdk.services.neptune.model.InvalidSubnetException;
import software.amazon.awssdk.services.neptune.model.InvalidVpcNetworkStateException;
import software.amazon.awssdk.services.neptune.model.KmsKeyNotAccessibleException;
import software.amazon.awssdk.services.neptune.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.neptune.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.neptune.model.ModifyDbClusterEndpointRequest;
import software.amazon.awssdk.services.neptune.model.ModifyDbClusterEndpointResponse;
import software.amazon.awssdk.services.neptune.model.ModifyDbClusterParameterGroupRequest;
import software.amazon.awssdk.services.neptune.model.ModifyDbClusterParameterGroupResponse;
import software.amazon.awssdk.services.neptune.model.ModifyDbClusterRequest;
import software.amazon.awssdk.services.neptune.model.ModifyDbClusterResponse;
import software.amazon.awssdk.services.neptune.model.ModifyDbClusterSnapshotAttributeRequest;
import software.amazon.awssdk.services.neptune.model.ModifyDbClusterSnapshotAttributeResponse;
import software.amazon.awssdk.services.neptune.model.ModifyDbInstanceRequest;
import software.amazon.awssdk.services.neptune.model.ModifyDbInstanceResponse;
import software.amazon.awssdk.services.neptune.model.ModifyDbParameterGroupRequest;
import software.amazon.awssdk.services.neptune.model.ModifyDbParameterGroupResponse;
import software.amazon.awssdk.services.neptune.model.ModifyDbSubnetGroupRequest;
import software.amazon.awssdk.services.neptune.model.ModifyDbSubnetGroupResponse;
import software.amazon.awssdk.services.neptune.model.ModifyEventSubscriptionRequest;
import software.amazon.awssdk.services.neptune.model.ModifyEventSubscriptionResponse;
import software.amazon.awssdk.services.neptune.model.ModifyGlobalClusterRequest;
import software.amazon.awssdk.services.neptune.model.ModifyGlobalClusterResponse;
import software.amazon.awssdk.services.neptune.model.NeptuneException;
import software.amazon.awssdk.services.neptune.model.OptionGroupNotFoundException;
import software.amazon.awssdk.services.neptune.model.PromoteReadReplicaDbClusterRequest;
import software.amazon.awssdk.services.neptune.model.PromoteReadReplicaDbClusterResponse;
import software.amazon.awssdk.services.neptune.model.ProvisionedIopsNotAvailableInAzException;
import software.amazon.awssdk.services.neptune.model.RebootDbInstanceRequest;
import software.amazon.awssdk.services.neptune.model.RebootDbInstanceResponse;
import software.amazon.awssdk.services.neptune.model.RemoveFromGlobalClusterRequest;
import software.amazon.awssdk.services.neptune.model.RemoveFromGlobalClusterResponse;
import software.amazon.awssdk.services.neptune.model.RemoveRoleFromDbClusterRequest;
import software.amazon.awssdk.services.neptune.model.RemoveRoleFromDbClusterResponse;
import software.amazon.awssdk.services.neptune.model.RemoveSourceIdentifierFromSubscriptionRequest;
import software.amazon.awssdk.services.neptune.model.RemoveSourceIdentifierFromSubscriptionResponse;
import software.amazon.awssdk.services.neptune.model.RemoveTagsFromResourceRequest;
import software.amazon.awssdk.services.neptune.model.RemoveTagsFromResourceResponse;
import software.amazon.awssdk.services.neptune.model.ResetDbClusterParameterGroupRequest;
import software.amazon.awssdk.services.neptune.model.ResetDbClusterParameterGroupResponse;
import software.amazon.awssdk.services.neptune.model.ResetDbParameterGroupRequest;
import software.amazon.awssdk.services.neptune.model.ResetDbParameterGroupResponse;
import software.amazon.awssdk.services.neptune.model.ResourceNotFoundException;
import software.amazon.awssdk.services.neptune.model.RestoreDbClusterFromSnapshotRequest;
import software.amazon.awssdk.services.neptune.model.RestoreDbClusterFromSnapshotResponse;
import software.amazon.awssdk.services.neptune.model.RestoreDbClusterToPointInTimeRequest;
import software.amazon.awssdk.services.neptune.model.RestoreDbClusterToPointInTimeResponse;
import software.amazon.awssdk.services.neptune.model.SharedSnapshotQuotaExceededException;
import software.amazon.awssdk.services.neptune.model.SnapshotQuotaExceededException;
import software.amazon.awssdk.services.neptune.model.SnsInvalidTopicException;
import software.amazon.awssdk.services.neptune.model.SnsNoAuthorizationException;
import software.amazon.awssdk.services.neptune.model.SnsTopicArnNotFoundException;
import software.amazon.awssdk.services.neptune.model.SourceNotFoundException;
import software.amazon.awssdk.services.neptune.model.StartDbClusterRequest;
import software.amazon.awssdk.services.neptune.model.StartDbClusterResponse;
import software.amazon.awssdk.services.neptune.model.StopDbClusterRequest;
import software.amazon.awssdk.services.neptune.model.StopDbClusterResponse;
import software.amazon.awssdk.services.neptune.model.StorageQuotaExceededException;
import software.amazon.awssdk.services.neptune.model.StorageTypeNotSupportedException;
import software.amazon.awssdk.services.neptune.model.SubnetAlreadyInUseException;
import software.amazon.awssdk.services.neptune.model.SubscriptionAlreadyExistException;
import software.amazon.awssdk.services.neptune.model.SubscriptionCategoryNotFoundException;
import software.amazon.awssdk.services.neptune.model.SubscriptionNotFoundException;
import software.amazon.awssdk.services.neptune.transform.AddRoleToDbClusterRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.AddSourceIdentifierToSubscriptionRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.AddTagsToResourceRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.ApplyPendingMaintenanceActionRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.CopyDbClusterParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.CopyDbClusterSnapshotRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.CopyDbParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.CreateDbClusterEndpointRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.CreateDbClusterParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.CreateDbClusterRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.CreateDbClusterSnapshotRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.CreateDbInstanceRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.CreateDbParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.CreateDbSubnetGroupRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.CreateEventSubscriptionRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.CreateGlobalClusterRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DeleteDbClusterEndpointRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DeleteDbClusterParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DeleteDbClusterRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DeleteDbClusterSnapshotRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DeleteDbInstanceRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DeleteDbParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DeleteDbSubnetGroupRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DeleteEventSubscriptionRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DeleteGlobalClusterRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeDbClusterEndpointsRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeDbClusterParameterGroupsRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeDbClusterParametersRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeDbClusterSnapshotAttributesRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeDbClusterSnapshotsRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeDbClustersRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeDbEngineVersionsRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeDbInstancesRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeDbParameterGroupsRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeDbParametersRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeDbSubnetGroupsRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeEngineDefaultClusterParametersRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeEngineDefaultParametersRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeEventCategoriesRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeEventSubscriptionsRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeEventsRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeGlobalClustersRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeOrderableDbInstanceOptionsRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribePendingMaintenanceActionsRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.DescribeValidDbInstanceModificationsRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.FailoverDbClusterRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.FailoverGlobalClusterRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.ModifyDbClusterEndpointRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.ModifyDbClusterParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.ModifyDbClusterRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.ModifyDbClusterSnapshotAttributeRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.ModifyDbInstanceRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.ModifyDbParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.ModifyDbSubnetGroupRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.ModifyEventSubscriptionRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.ModifyGlobalClusterRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.PromoteReadReplicaDbClusterRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.RebootDbInstanceRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.RemoveFromGlobalClusterRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.RemoveRoleFromDbClusterRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.RemoveSourceIdentifierFromSubscriptionRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.RemoveTagsFromResourceRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.ResetDbClusterParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.ResetDbParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.RestoreDbClusterFromSnapshotRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.RestoreDbClusterToPointInTimeRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.StartDbClusterRequestMarshaller;
import software.amazon.awssdk.services.neptune.transform.StopDbClusterRequestMarshaller;
import software.amazon.awssdk.services.neptune.waiters.NeptuneAsyncWaiter;
import software.amazon.awssdk.utils.CompletableFutureUtils;
/**
* Internal implementation of {@link NeptuneAsyncClient}.
*
* @see NeptuneAsyncClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultNeptuneAsyncClient implements NeptuneAsyncClient {
private static final Logger log = LoggerFactory.getLogger(DefaultNeptuneAsyncClient.class);
private static final AwsProtocolMetadata protocolMetadata = AwsProtocolMetadata.builder()
.serviceProtocol(AwsServiceProtocol.QUERY).build();
private final AsyncClientHandler clientHandler;
private final AwsQueryProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
private final ScheduledExecutorService executorService;
protected DefaultNeptuneAsyncClient(SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsAsyncClientHandler(clientConfiguration);
this.clientConfiguration = clientConfiguration.toBuilder().option(SdkClientOption.SDK_CLIENT, this).build();
this.protocolFactory = init();
this.executorService = clientConfiguration.option(SdkClientOption.SCHEDULED_EXECUTOR_SERVICE);
}
/**
*
* Associates an Identity and Access Management (IAM) role with an Neptune DB cluster.
*
*
* @param addRoleToDbClusterRequest
* @return A Java Future containing the result of the AddRoleToDBCluster operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbClusterNotFoundException DBClusterIdentifier does not refer to an existing DB cluster.
* - DbClusterRoleAlreadyExistsException The specified IAM role Amazon Resource Name (ARN) is already
* associated with the specified DB cluster.
* - InvalidDbClusterStateException The DB cluster is not in a valid state.
* - DbClusterRoleQuotaExceededException You have exceeded the maximum number of IAM roles that can be
* associated with the specified DB cluster.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.AddRoleToDBCluster
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture addRoleToDBCluster(AddRoleToDbClusterRequest addRoleToDbClusterRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(addRoleToDbClusterRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, addRoleToDbClusterRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AddRoleToDBCluster");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(AddRoleToDbClusterResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AddRoleToDBCluster").withProtocolMetadata(protocolMetadata)
.withMarshaller(new AddRoleToDbClusterRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(addRoleToDbClusterRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Adds a source identifier to an existing event notification subscription.
*
*
* @param addSourceIdentifierToSubscriptionRequest
* @return A Java Future containing the result of the AddSourceIdentifierToSubscription operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - SubscriptionNotFoundException The designated subscription could not be found.
* - SourceNotFoundException The source could not be found.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.AddSourceIdentifierToSubscription
* @see AWS API Documentation
*/
@Override
public CompletableFuture addSourceIdentifierToSubscription(
AddSourceIdentifierToSubscriptionRequest addSourceIdentifierToSubscriptionRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(addSourceIdentifierToSubscriptionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
addSourceIdentifierToSubscriptionRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AddSourceIdentifierToSubscription");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(AddSourceIdentifierToSubscriptionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AddSourceIdentifierToSubscription").withProtocolMetadata(protocolMetadata)
.withMarshaller(new AddSourceIdentifierToSubscriptionRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(addSourceIdentifierToSubscriptionRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Adds metadata tags to an Amazon Neptune resource. These tags can also be used with cost allocation reporting to
* track cost associated with Amazon Neptune resources, or used in a Condition statement in an IAM policy for Amazon
* Neptune.
*
*
* @param addTagsToResourceRequest
* @return A Java Future containing the result of the AddTagsToResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbInstanceNotFoundException DBInstanceIdentifier does not refer to an existing DB instance.
* - DbSnapshotNotFoundException DBSnapshotIdentifier does not refer to an existing DB snapshot.
* - DbClusterNotFoundException DBClusterIdentifier does not refer to an existing DB cluster.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.AddTagsToResource
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture addTagsToResource(AddTagsToResourceRequest addTagsToResourceRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(addTagsToResourceRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, addTagsToResourceRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AddTagsToResource");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(AddTagsToResourceResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AddTagsToResource").withProtocolMetadata(protocolMetadata)
.withMarshaller(new AddTagsToResourceRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(addTagsToResourceRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Applies a pending maintenance action to a resource (for example, to a DB instance).
*
*
* @param applyPendingMaintenanceActionRequest
* @return A Java Future containing the result of the ApplyPendingMaintenanceAction operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException The specified resource ID was not found.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.ApplyPendingMaintenanceAction
* @see AWS API Documentation
*/
@Override
public CompletableFuture applyPendingMaintenanceAction(
ApplyPendingMaintenanceActionRequest applyPendingMaintenanceActionRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(applyPendingMaintenanceActionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
applyPendingMaintenanceActionRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ApplyPendingMaintenanceAction");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ApplyPendingMaintenanceActionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ApplyPendingMaintenanceAction").withProtocolMetadata(protocolMetadata)
.withMarshaller(new ApplyPendingMaintenanceActionRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(applyPendingMaintenanceActionRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Copies the specified DB cluster parameter group.
*
*
* @param copyDbClusterParameterGroupRequest
* @return A Java Future containing the result of the CopyDBClusterParameterGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbParameterGroupNotFoundException DBParameterGroupName does not refer to an existing DB
* parameter group.
* - DbParameterGroupQuotaExceededException Request would result in user exceeding the allowed number of
* DB parameter groups.
* - DbParameterGroupAlreadyExistsException A DB parameter group with the same name exists.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.CopyDBClusterParameterGroup
* @see AWS API Documentation
*/
@Override
public CompletableFuture copyDBClusterParameterGroup(
CopyDbClusterParameterGroupRequest copyDbClusterParameterGroupRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(copyDbClusterParameterGroupRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, copyDbClusterParameterGroupRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CopyDBClusterParameterGroup");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CopyDbClusterParameterGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CopyDBClusterParameterGroup").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CopyDbClusterParameterGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(copyDbClusterParameterGroupRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* 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.
*
*
* @param copyDbClusterSnapshotRequest
* @return A Java Future containing the result of the CopyDBClusterSnapshot operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbClusterSnapshotAlreadyExistsException User already has a DB cluster snapshot with the given
* identifier.
* - DbClusterSnapshotNotFoundException DBClusterSnapshotIdentifier does not refer to an existing
* DB cluster snapshot.
* - InvalidDbClusterStateException The DB cluster is not in a valid state.
* - InvalidDbClusterSnapshotStateException The supplied value is not a valid DB cluster snapshot state.
* - SnapshotQuotaExceededException Request would result in user exceeding the allowed number of DB
* snapshots.
* - KmsKeyNotAccessibleException Error accessing KMS key.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.CopyDBClusterSnapshot
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture copyDBClusterSnapshot(
CopyDbClusterSnapshotRequest copyDbClusterSnapshotRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(copyDbClusterSnapshotRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, copyDbClusterSnapshotRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CopyDBClusterSnapshot");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CopyDbClusterSnapshotResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CopyDBClusterSnapshot").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CopyDbClusterSnapshotRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(copyDbClusterSnapshotRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Copies the specified DB parameter group.
*
*
* @param copyDbParameterGroupRequest
* @return A Java Future containing the result of the CopyDBParameterGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbParameterGroupNotFoundException DBParameterGroupName does not refer to an existing DB
* parameter group.
* - DbParameterGroupAlreadyExistsException A DB parameter group with the same name exists.
* - DbParameterGroupQuotaExceededException Request would result in user exceeding the allowed number of
* DB parameter groups.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.CopyDBParameterGroup
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture copyDBParameterGroup(
CopyDbParameterGroupRequest copyDbParameterGroupRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(copyDbParameterGroupRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, copyDbParameterGroupRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CopyDBParameterGroup");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CopyDbParameterGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CopyDBParameterGroup").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CopyDbParameterGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(copyDbParameterGroupRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a new Amazon Neptune DB cluster.
*
*
* You can use the ReplicationSourceIdentifier
parameter to create the DB cluster as a Read Replica of
* another DB cluster or Amazon Neptune DB instance.
*
*
* Note that when you create a new cluster using CreateDBCluster
directly, deletion protection is
* disabled by default (when you create a new production cluster in the console, deletion protection is enabled by
* default). You can only delete a DB cluster if its DeletionProtection
field is set to
* false
.
*
*
* @param createDbClusterRequest
* @return A Java Future containing the result of the CreateDBCluster operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbClusterAlreadyExistsException User already has a DB cluster with the given identifier.
* - InsufficientStorageClusterCapacityException There is insufficient storage available for the current
* action. You may be able to resolve this error by updating your subnet group to use different Availability
* Zones that have more storage available.
* - DbClusterQuotaExceededException User attempted to create a new DB cluster and the user has already
* reached the maximum allowed DB cluster quota.
* - StorageQuotaExceededException Request would result in user exceeding the allowed amount of storage
* available across all DB instances.
* - DbSubnetGroupNotFoundException DBSubnetGroupName does not refer to an existing DB subnet
* group.
* - InvalidVpcNetworkStateException DB subnet group does not cover all Availability Zones after it is
* created because users' change.
* - InvalidDbClusterStateException The DB cluster is not in a valid state.
* - InvalidDbSubnetGroupStateException The DB subnet group cannot be deleted because it is in use.
* - InvalidSubnetException The requested subnet is invalid, or multiple subnets were requested that are
* not all in a common VPC.
* - InvalidDbInstanceStateException The specified DB instance is not in the available state.
* - DbClusterParameterGroupNotFoundException DBClusterParameterGroupName does not refer to an
* existing DB Cluster parameter group.
* - KmsKeyNotAccessibleException Error accessing KMS key.
* - DbClusterNotFoundException DBClusterIdentifier does not refer to an existing DB cluster.
* - DbInstanceNotFoundException DBInstanceIdentifier does not refer to an existing DB instance.
* - DbSubnetGroupDoesNotCoverEnoughAZsException Subnets in the DB subnet group should cover at least two
* Availability Zones unless there is only one Availability Zone.
* - GlobalClusterNotFoundException The
GlobalClusterIdentifier
doesn't refer to an existing
* global database cluster.
* - InvalidGlobalClusterStateException The global cluster is in an invalid state and can't perform the
* requested operation.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.CreateDBCluster
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture createDBCluster(CreateDbClusterRequest createDbClusterRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createDbClusterRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createDbClusterRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateDBCluster");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateDbClusterResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateDBCluster").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateDbClusterRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createDbClusterRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a new custom endpoint and associates it with an Amazon Neptune DB cluster.
*
*
* @param createDbClusterEndpointRequest
* @return A Java Future containing the result of the CreateDBClusterEndpoint operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbClusterEndpointQuotaExceededException The cluster already has the maximum number of custom
* endpoints.
* - DbClusterEndpointAlreadyExistsException The specified custom endpoint cannot be created because it
* already exists.
* - DbClusterNotFoundException DBClusterIdentifier does not refer to an existing DB cluster.
* - InvalidDbClusterStateException The DB cluster is not in a valid state.
* - DbInstanceNotFoundException DBInstanceIdentifier does not refer to an existing DB instance.
* - InvalidDbInstanceStateException The specified DB instance is not in the available state.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.CreateDBClusterEndpoint
* @see AWS API Documentation
*/
@Override
public CompletableFuture createDBClusterEndpoint(
CreateDbClusterEndpointRequest createDbClusterEndpointRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createDbClusterEndpointRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createDbClusterEndpointRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateDBClusterEndpoint");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateDbClusterEndpointResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateDBClusterEndpoint").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateDbClusterEndpointRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createDbClusterEndpointRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* 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
* creating it using ModifyDBClusterParameterGroup. Once you've created a DB cluster parameter group, you
* need to associate it with your DB cluster using ModifyDBCluster. When you associate a new DB cluster
* parameter group with a running DB cluster, you need to reboot the DB instances in the DB cluster without failover
* for the new DB cluster parameter group and associated settings to 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 Neptune to
* fully complete the create action before the DB cluster parameter group is used as the default for a new DB
* cluster. This 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. You can use the Parameter Groups option of the Amazon Neptune console or the DescribeDBClusterParameters
* command to verify that your DB cluster parameter group has been created or modified.
*
*
*
* @param createDbClusterParameterGroupRequest
* @return A Java Future containing the result of the CreateDBClusterParameterGroup operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbParameterGroupQuotaExceededException Request would result in user exceeding the allowed number of
* DB parameter groups.
* - DbParameterGroupAlreadyExistsException A DB parameter group with the same name exists.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.CreateDBClusterParameterGroup
* @see AWS API Documentation
*/
@Override
public CompletableFuture createDBClusterParameterGroup(
CreateDbClusterParameterGroupRequest createDbClusterParameterGroupRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createDbClusterParameterGroupRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
createDbClusterParameterGroupRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateDBClusterParameterGroup");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateDbClusterParameterGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateDBClusterParameterGroup").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateDbClusterParameterGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createDbClusterParameterGroupRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a snapshot of a DB cluster.
*
*
* @param createDbClusterSnapshotRequest
* @return A Java Future containing the result of the CreateDBClusterSnapshot operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbClusterSnapshotAlreadyExistsException User already has a DB cluster snapshot with the given
* identifier.
* - InvalidDbClusterStateException The DB cluster is not in a valid state.
* - DbClusterNotFoundException DBClusterIdentifier does not refer to an existing DB cluster.
* - SnapshotQuotaExceededException Request would result in user exceeding the allowed number of DB
* snapshots.
* - InvalidDbClusterSnapshotStateException The supplied value is not a valid DB cluster snapshot state.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.CreateDBClusterSnapshot
* @see AWS API Documentation
*/
@Override
public CompletableFuture createDBClusterSnapshot(
CreateDbClusterSnapshotRequest createDbClusterSnapshotRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createDbClusterSnapshotRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createDbClusterSnapshotRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateDBClusterSnapshot");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateDbClusterSnapshotResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateDBClusterSnapshot").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateDbClusterSnapshotRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createDbClusterSnapshotRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a new DB instance.
*
*
* @param createDbInstanceRequest
* @return A Java Future containing the result of the CreateDBInstance operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbInstanceAlreadyExistsException User already has a DB instance with the given identifier.
* - InsufficientDbInstanceCapacityException Specified DB instance class is not available in the specified
* Availability Zone.
* - DbParameterGroupNotFoundException DBParameterGroupName does not refer to an existing DB
* parameter group.
* - DbSecurityGroupNotFoundException DBSecurityGroupName does not refer to an existing DB security
* group.
* - InstanceQuotaExceededException Request would result in user exceeding the allowed number of DB
* instances.
* - StorageQuotaExceededException Request would result in user exceeding the allowed amount of storage
* available across all DB instances.
* - DbSubnetGroupNotFoundException DBSubnetGroupName does not refer to an existing DB subnet
* group.
* - DbSubnetGroupDoesNotCoverEnoughAZsException Subnets in the DB subnet group should cover at least two
* Availability Zones unless there is only one Availability Zone.
* - InvalidDbClusterStateException The DB cluster is not in a valid state.
* - InvalidSubnetException The requested subnet is invalid, or multiple subnets were requested that are
* not all in a common VPC.
* - InvalidVpcNetworkStateException DB subnet group does not cover all Availability Zones after it is
* created because users' change.
* - ProvisionedIopsNotAvailableInAzException Provisioned IOPS not available in the specified Availability
* Zone.
* - OptionGroupNotFoundException The designated option group could not be found.
* - DbClusterNotFoundException DBClusterIdentifier does not refer to an existing DB cluster.
* - StorageTypeNotSupportedException StorageType specified cannot be associated with the DB
* Instance.
* - AuthorizationNotFoundException Specified CIDRIP or EC2 security group is not authorized for the
* specified DB security group.
*
* Neptune may not also be authorized via IAM to perform necessary actions on your behalf.
* - KmsKeyNotAccessibleException Error accessing KMS key.
* - DomainNotFoundException Domain does not refer to an existing Active Directory Domain.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.CreateDBInstance
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture createDBInstance(CreateDbInstanceRequest createDbInstanceRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createDbInstanceRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createDbInstanceRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateDBInstance");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateDbInstanceResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateDBInstance").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateDbInstanceRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createDbInstanceRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a new DB parameter group.
*
*
* A DB parameter group is initially created with the default parameters for the database engine used by the DB
* instance. To provide custom values for any of the parameters, you must modify the group after creating it using
* ModifyDBParameterGroup. Once you've created a DB parameter group, you need to associate it with your DB
* instance using ModifyDBInstance. When you associate a new DB parameter group with a running DB instance,
* you need to reboot the DB instance without failover for the new DB parameter group and associated settings to
* take effect.
*
*
*
* After you create a DB parameter group, you should wait at least 5 minutes before creating your first DB instance
* that uses that DB parameter group as the default parameter group. This allows Amazon Neptune to fully complete
* the create action before the parameter group is used as the default for a new DB instance. This is especially
* important for parameters that are critical when creating the default database for a DB instance, such as the
* character set for the default database defined by the character_set_database
parameter. You can use
* the Parameter Groups option of the Amazon Neptune console or the DescribeDBParameters command to
* verify that your DB parameter group has been created or modified.
*
*
*
* @param createDbParameterGroupRequest
* @return A Java Future containing the result of the CreateDBParameterGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbParameterGroupQuotaExceededException Request would result in user exceeding the allowed number of
* DB parameter groups.
* - DbParameterGroupAlreadyExistsException A DB parameter group with the same name exists.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.CreateDBParameterGroup
* @see AWS API Documentation
*/
@Override
public CompletableFuture createDBParameterGroup(
CreateDbParameterGroupRequest createDbParameterGroupRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createDbParameterGroupRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createDbParameterGroupRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateDBParameterGroup");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateDbParameterGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateDBParameterGroup").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateDbParameterGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createDbParameterGroupRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a new DB subnet group. DB subnet groups must contain at least one subnet in at least two AZs in the
* Amazon Region.
*
*
* @param createDbSubnetGroupRequest
* @return A Java Future containing the result of the CreateDBSubnetGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbSubnetGroupAlreadyExistsException DBSubnetGroupName is already used by an existing DB subnet
* group.
* - DbSubnetGroupQuotaExceededException Request would result in user exceeding the allowed number of DB
* subnet groups.
* - DbSubnetQuotaExceededException Request would result in user exceeding the allowed number of subnets
* in a DB subnet groups.
* - DbSubnetGroupDoesNotCoverEnoughAZsException Subnets in the DB subnet group should cover at least two
* Availability Zones unless there is only one Availability Zone.
* - InvalidSubnetException The requested subnet is invalid, or multiple subnets were requested that are
* not all in a common VPC.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.CreateDBSubnetGroup
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture createDBSubnetGroup(
CreateDbSubnetGroupRequest createDbSubnetGroupRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createDbSubnetGroupRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createDbSubnetGroupRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateDBSubnetGroup");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateDbSubnetGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateDBSubnetGroup").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateDbSubnetGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createDbSubnetGroupRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates an event notification subscription. This action requires a topic ARN (Amazon Resource Name) created by
* either the Neptune console, the SNS console, or the SNS API. To obtain an ARN with SNS, you must create a topic
* in Amazon SNS and subscribe to the topic. The ARN is displayed in the SNS console.
*
*
* You can specify the type of source (SourceType) you want to be notified of, provide a list of Neptune sources
* (SourceIds) that triggers the events, and provide a list of event categories (EventCategories) for events you
* want to be notified of. For example, you can specify SourceType = db-instance, SourceIds = mydbinstance1,
* mydbinstance2 and EventCategories = Availability, Backup.
*
*
* If you specify both the SourceType and SourceIds, such as SourceType = db-instance and SourceIdentifier =
* myDBInstance1, you are notified of all the db-instance events for the specified source. If you specify a
* SourceType but do not specify a SourceIdentifier, you receive notice of the events for that source type for all
* your Neptune sources. If you do not specify either the SourceType nor the SourceIdentifier, you are notified of
* events generated from all Neptune sources belonging to your customer account.
*
*
* @param createEventSubscriptionRequest
* @return A Java Future containing the result of the CreateEventSubscription operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - EventSubscriptionQuotaExceededException You have exceeded the number of events you can subscribe to.
* - SubscriptionAlreadyExistException This subscription already exists.
* - SnsInvalidTopicException The SNS topic is invalid.
* - SnsNoAuthorizationException There is no SNS authorization.
* - SnsTopicArnNotFoundException The ARN of the SNS topic could not be found.
* - SubscriptionCategoryNotFoundException The designated subscription category could not be found.
* - SourceNotFoundException The source could not be found.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.CreateEventSubscription
* @see AWS API Documentation
*/
@Override
public CompletableFuture createEventSubscription(
CreateEventSubscriptionRequest createEventSubscriptionRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createEventSubscriptionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createEventSubscriptionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateEventSubscription");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateEventSubscriptionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateEventSubscription").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateEventSubscriptionRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createEventSubscriptionRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a Neptune global database spread across multiple Amazon Regions. The global database contains a single
* primary cluster with read-write capability, and read-only secondary clusters that receive data from the primary
* cluster through high-speed replication performed by the Neptune storage subsystem.
*
*
* You can create a global database that is initially empty, and then add a primary cluster and secondary clusters
* to it, or you can specify an existing Neptune cluster during the create operation to become the primary cluster
* of the global database.
*
*
* @param createGlobalClusterRequest
* @return A Java Future containing the result of the CreateGlobalCluster operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - GlobalClusterAlreadyExistsException The
GlobalClusterIdentifier
already exists. Choose a
* new global database identifier (unique name) to create a new global database cluster.
* - GlobalClusterQuotaExceededException The number of global database clusters for this account is
* already at the maximum allowed.
* - InvalidDbClusterStateException The DB cluster is not in a valid state.
* - DbClusterNotFoundException DBClusterIdentifier does not refer to an existing DB cluster.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.CreateGlobalCluster
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture createGlobalCluster(
CreateGlobalClusterRequest createGlobalClusterRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createGlobalClusterRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createGlobalClusterRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateGlobalCluster");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateGlobalClusterResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateGlobalCluster").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateGlobalClusterRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createGlobalClusterRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* The DeleteDBCluster action 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.
*
*
* Note that the DB Cluster cannot be deleted if deletion protection is enabled. To delete it, you must first set
* its DeletionProtection
field to False
.
*
*
* @param deleteDbClusterRequest
* @return A Java Future containing the result of the DeleteDBCluster operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbClusterNotFoundException DBClusterIdentifier does not refer to an existing DB cluster.
* - InvalidDbClusterStateException The DB cluster is not in a valid state.
* - DbClusterSnapshotAlreadyExistsException User already has a DB cluster snapshot with the given
* identifier.
* - SnapshotQuotaExceededException Request would result in user exceeding the allowed number of DB
* snapshots.
* - InvalidDbClusterSnapshotStateException The supplied value is not a valid DB cluster snapshot state.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DeleteDBCluster
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture deleteDBCluster(DeleteDbClusterRequest deleteDbClusterRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteDbClusterRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDbClusterRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDBCluster");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteDbClusterResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteDBCluster").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteDbClusterRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteDbClusterRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a custom endpoint and removes it from an Amazon Neptune DB cluster.
*
*
* @param deleteDbClusterEndpointRequest
* @return A Java Future containing the result of the DeleteDBClusterEndpoint operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidDbClusterEndpointStateException The requested operation cannot be performed on the endpoint
* while the endpoint is in this state.
* - DbClusterEndpointNotFoundException The specified custom endpoint doesn't exist.
* - InvalidDbClusterStateException The DB cluster is not in a valid state.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DeleteDBClusterEndpoint
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteDBClusterEndpoint(
DeleteDbClusterEndpointRequest deleteDbClusterEndpointRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteDbClusterEndpointRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDbClusterEndpointRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDBClusterEndpoint");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteDbClusterEndpointResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteDBClusterEndpoint").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteDbClusterEndpointRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteDbClusterEndpointRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* 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
* @return A Java Future containing the result of the DeleteDBClusterParameterGroup operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidDbParameterGroupStateException The DB parameter group is in use or is in an invalid state. If
* you are attempting to delete the parameter group, you cannot delete it when the parameter group is in
* this state.
* - DbParameterGroupNotFoundException DBParameterGroupName does not refer to an existing DB
* parameter group.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DeleteDBClusterParameterGroup
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteDBClusterParameterGroup(
DeleteDbClusterParameterGroupRequest deleteDbClusterParameterGroupRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteDbClusterParameterGroupRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteDbClusterParameterGroupRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDBClusterParameterGroup");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteDbClusterParameterGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteDBClusterParameterGroup").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteDbClusterParameterGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteDbClusterParameterGroupRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* 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
* @return A Java Future containing the result of the DeleteDBClusterSnapshot operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidDbClusterSnapshotStateException The supplied value is not a valid DB cluster snapshot state.
* - DbClusterSnapshotNotFoundException DBClusterSnapshotIdentifier does not refer to an existing
* DB cluster snapshot.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DeleteDBClusterSnapshot
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteDBClusterSnapshot(
DeleteDbClusterSnapshotRequest deleteDbClusterSnapshotRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteDbClusterSnapshotRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDbClusterSnapshotRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDBClusterSnapshot");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteDbClusterSnapshotResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteDBClusterSnapshot").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteDbClusterSnapshotRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteDbClusterSnapshotRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* The DeleteDBInstance action deletes a previously provisioned DB instance. When you delete a DB instance, all
* automated backups for that instance are deleted and can't be recovered. Manual DB snapshots of the DB instance to
* be deleted by DeleteDBInstance
are not deleted.
*
*
* If you request a final DB snapshot the status of the Amazon Neptune DB instance is deleting
until
* the DB snapshot is created. The API action DescribeDBInstance
is used to monitor the status of this
* operation. The action can't be canceled or reverted once submitted.
*
*
* Note that when a DB instance is in a failure state and has a status of failed
,
* incompatible-restore
, or incompatible-network
, you can only delete it when the
* SkipFinalSnapshot
parameter is set to true
.
*
*
* You can't delete a DB instance if it is the only instance in the DB cluster, or if it has deletion protection
* enabled.
*
*
* @param deleteDbInstanceRequest
* @return A Java Future containing the result of the DeleteDBInstance operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbInstanceNotFoundException DBInstanceIdentifier does not refer to an existing DB instance.
* - InvalidDbInstanceStateException The specified DB instance is not in the available state.
* - DbSnapshotAlreadyExistsException DBSnapshotIdentifier is already used by an existing snapshot.
*
* - SnapshotQuotaExceededException Request would result in user exceeding the allowed number of DB
* snapshots.
* - InvalidDbClusterStateException The DB cluster is not in a valid state.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DeleteDBInstance
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture deleteDBInstance(DeleteDbInstanceRequest deleteDbInstanceRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteDbInstanceRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDbInstanceRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDBInstance");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteDbInstanceResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteDBInstance").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteDbInstanceRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteDbInstanceRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a specified DBParameterGroup. The DBParameterGroup to be deleted can't be associated with any DB
* instances.
*
*
* @param deleteDbParameterGroupRequest
* @return A Java Future containing the result of the DeleteDBParameterGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidDbParameterGroupStateException The DB parameter group is in use or is in an invalid state. If
* you are attempting to delete the parameter group, you cannot delete it when the parameter group is in
* this state.
* - DbParameterGroupNotFoundException DBParameterGroupName does not refer to an existing DB
* parameter group.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DeleteDBParameterGroup
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteDBParameterGroup(
DeleteDbParameterGroupRequest deleteDbParameterGroupRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteDbParameterGroupRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDbParameterGroupRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDBParameterGroup");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteDbParameterGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteDBParameterGroup").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteDbParameterGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteDbParameterGroupRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a DB subnet group.
*
*
*
* The specified database subnet group must not be associated with any DB instances.
*
*
*
* @param deleteDbSubnetGroupRequest
* @return A Java Future containing the result of the DeleteDBSubnetGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidDbSubnetGroupStateException The DB subnet group cannot be deleted because it is in use.
* - InvalidDbSubnetStateException The DB subnet is not in the available state.
* - DbSubnetGroupNotFoundException DBSubnetGroupName does not refer to an existing DB subnet
* group.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DeleteDBSubnetGroup
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture deleteDBSubnetGroup(
DeleteDbSubnetGroupRequest deleteDbSubnetGroupRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteDbSubnetGroupRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDbSubnetGroupRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDBSubnetGroup");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteDbSubnetGroupResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteDBSubnetGroup").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteDbSubnetGroupRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteDbSubnetGroupRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes an event notification subscription.
*
*
* @param deleteEventSubscriptionRequest
* @return A Java Future containing the result of the DeleteEventSubscription operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - SubscriptionNotFoundException The designated subscription could not be found.
* - InvalidEventSubscriptionStateException The event subscription is in an invalid state.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DeleteEventSubscription
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteEventSubscription(
DeleteEventSubscriptionRequest deleteEventSubscriptionRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteEventSubscriptionRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteEventSubscriptionRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteEventSubscription");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteEventSubscriptionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteEventSubscription").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteEventSubscriptionRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteEventSubscriptionRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a global database. The primary and all secondary clusters must already be detached or deleted first.
*
*
* @param deleteGlobalClusterRequest
* @return A Java Future containing the result of the DeleteGlobalCluster operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - GlobalClusterNotFoundException The
GlobalClusterIdentifier
doesn't refer to an existing
* global database cluster.
* - InvalidGlobalClusterStateException The global cluster is in an invalid state and can't perform the
* requested operation.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DeleteGlobalCluster
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture deleteGlobalCluster(
DeleteGlobalClusterRequest deleteGlobalClusterRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteGlobalClusterRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteGlobalClusterRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteGlobalCluster");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteGlobalClusterResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteGlobalCluster").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteGlobalClusterRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteGlobalClusterRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns information about endpoints for an Amazon Neptune DB cluster.
*
*
*
* This operation can also return information for Amazon RDS clusters and Amazon DocDB clusters.
*
*
*
* @param describeDbClusterEndpointsRequest
* @return A Java Future containing the result of the DescribeDBClusterEndpoints operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbClusterNotFoundException DBClusterIdentifier does not refer to an existing DB cluster.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DescribeDBClusterEndpoints
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeDBClusterEndpoints(
DescribeDbClusterEndpointsRequest describeDbClusterEndpointsRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDbClusterEndpointsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDbClusterEndpointsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDBClusterEndpoints");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeDbClusterEndpointsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeDBClusterEndpoints").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeDbClusterEndpointsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeDbClusterEndpointsRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a list of DBClusterParameterGroup
descriptions. If a
* DBClusterParameterGroupName
parameter is specified, the list will contain only the description of
* the specified DB cluster parameter group.
*
*
* @param describeDbClusterParameterGroupsRequest
* @return A Java Future containing the result of the DescribeDBClusterParameterGroups operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbParameterGroupNotFoundException DBParameterGroupName does not refer to an existing DB
* parameter group.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DescribeDBClusterParameterGroups
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeDBClusterParameterGroups(
DescribeDbClusterParameterGroupsRequest describeDbClusterParameterGroupsRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDbClusterParameterGroupsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeDbClusterParameterGroupsRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDBClusterParameterGroups");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeDbClusterParameterGroupsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeDBClusterParameterGroups").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeDbClusterParameterGroupsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeDbClusterParameterGroupsRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the detailed parameter list for a particular DB cluster parameter group.
*
*
* @param describeDbClusterParametersRequest
* @return A Java Future containing the result of the DescribeDBClusterParameters operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbParameterGroupNotFoundException DBParameterGroupName does not refer to an existing DB
* parameter group.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DescribeDBClusterParameters
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeDBClusterParameters(
DescribeDbClusterParametersRequest describeDbClusterParametersRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDbClusterParametersRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDbClusterParametersRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDBClusterParameters");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeDbClusterParametersResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeDBClusterParameters").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeDbClusterParametersRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeDbClusterParametersRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a list of DB cluster snapshot attribute names and values for a manual DB cluster snapshot.
*
*
* When sharing snapshots with other Amazon accounts, DescribeDBClusterSnapshotAttributes
returns the
* restore
attribute and a list of IDs for the Amazon 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 Amazon accounts.
*
*
* To add or remove access for an Amazon account to copy or restore a manual DB cluster snapshot, or to make the
* manual DB cluster snapshot public or private, use the ModifyDBClusterSnapshotAttribute API action.
*
*
* @param describeDbClusterSnapshotAttributesRequest
* @return A Java Future containing the result of the DescribeDBClusterSnapshotAttributes operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbClusterSnapshotNotFoundException DBClusterSnapshotIdentifier does not refer to an existing
* DB cluster snapshot.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DescribeDBClusterSnapshotAttributes
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeDBClusterSnapshotAttributes(
DescribeDbClusterSnapshotAttributesRequest describeDbClusterSnapshotAttributesRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDbClusterSnapshotAttributesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeDbClusterSnapshotAttributesRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDBClusterSnapshotAttributes");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeDbClusterSnapshotAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeDBClusterSnapshotAttributes").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeDbClusterSnapshotAttributesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeDbClusterSnapshotAttributesRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns information about DB cluster snapshots. This API action supports pagination.
*
*
* @param describeDbClusterSnapshotsRequest
* @return A Java Future containing the result of the DescribeDBClusterSnapshots operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbClusterSnapshotNotFoundException DBClusterSnapshotIdentifier does not refer to an existing
* DB cluster snapshot.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DescribeDBClusterSnapshots
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeDBClusterSnapshots(
DescribeDbClusterSnapshotsRequest describeDbClusterSnapshotsRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDbClusterSnapshotsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDbClusterSnapshotsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDBClusterSnapshots");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeDbClusterSnapshotsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeDBClusterSnapshots").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeDbClusterSnapshotsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeDbClusterSnapshotsRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns information about provisioned DB clusters, and supports pagination.
*
*
*
* This operation can also return information for Amazon RDS clusters and Amazon DocDB clusters.
*
*
*
* @param describeDbClustersRequest
* @return A Java Future containing the result of the DescribeDBClusters operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbClusterNotFoundException DBClusterIdentifier does not refer to an existing DB cluster.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DescribeDBClusters
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture describeDBClusters(DescribeDbClustersRequest describeDbClustersRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDbClustersRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDbClustersRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDBClusters");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeDbClustersResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeDBClusters").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeDbClustersRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeDbClustersRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a list of the available DB engines.
*
*
* @param describeDbEngineVersionsRequest
* @return A Java Future containing the result of the DescribeDBEngineVersions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DescribeDBEngineVersions
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeDBEngineVersions(
DescribeDbEngineVersionsRequest describeDbEngineVersionsRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDbEngineVersionsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDbEngineVersionsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDBEngineVersions");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeDbEngineVersionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeDBEngineVersions").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeDbEngineVersionsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeDbEngineVersionsRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns information about provisioned instances, and supports pagination.
*
*
*
* This operation can also return information for Amazon RDS instances and Amazon DocDB instances.
*
*
*
* @param describeDbInstancesRequest
* @return A Java Future containing the result of the DescribeDBInstances operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbInstanceNotFoundException DBInstanceIdentifier does not refer to an existing DB instance.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DescribeDBInstances
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture describeDBInstances(
DescribeDbInstancesRequest describeDbInstancesRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDbInstancesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDbInstancesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDBInstances");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeDbInstancesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeDBInstances").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeDbInstancesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeDbInstancesRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a list of DBParameterGroup
descriptions. If a DBParameterGroupName
is
* specified, the list will contain only the description of the specified DB parameter group.
*
*
* @param describeDbParameterGroupsRequest
* @return A Java Future containing the result of the DescribeDBParameterGroups operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbParameterGroupNotFoundException DBParameterGroupName does not refer to an existing DB
* parameter group.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DescribeDBParameterGroups
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeDBParameterGroups(
DescribeDbParameterGroupsRequest describeDbParameterGroupsRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDbParameterGroupsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDbParameterGroupsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDBParameterGroups");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeDbParameterGroupsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeDBParameterGroups").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeDbParameterGroupsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeDbParameterGroupsRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the detailed parameter list for a particular DB parameter group.
*
*
* @param describeDbParametersRequest
* @return A Java Future containing the result of the DescribeDBParameters operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbParameterGroupNotFoundException DBParameterGroupName does not refer to an existing DB
* parameter group.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DescribeDBParameters
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture describeDBParameters(
DescribeDbParametersRequest describeDbParametersRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDbParametersRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDbParametersRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDBParameters");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeDbParametersResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeDBParameters").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DescribeDbParametersRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(describeDbParametersRequest));
CompletableFuture whenCompleteFuture = null;
whenCompleteFuture = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture);
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is specified, the list will contain only the
* descriptions of the specified DBSubnetGroup.
*
*
* For an overview of CIDR ranges, go to the Wikipedia Tutorial.
*
*
* @param describeDbSubnetGroupsRequest
* @return A Java Future containing the result of the DescribeDBSubnetGroups operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DbSubnetGroupNotFoundException DBSubnetGroupName does not refer to an existing DB subnet
* group.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - NeptuneException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample NeptuneAsyncClient.DescribeDBSubnetGroups
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeDBSubnetGroups(
DescribeDbSubnetGroupsRequest describeDbSubnetGroupsRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDbSubnetGroupsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDbSubnetGroupsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDBSubnetGroups");
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeDbSubnetGroupsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams