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

software.amazon.awssdk.services.neptune.DefaultNeptuneAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Neptune module holds the client classes that are used for communicating with Neptune.

There is a newer version: 2.29.15
Show newest version
/*
 * 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() .withOperationName("DescribeDBSubnetGroups").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeDbSubnetGroupsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeDbSubnetGroupsRequest)); 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 default engine and system parameter information for the cluster database engine. *

* * @param describeEngineDefaultClusterParametersRequest * @return A Java Future containing the result of the DescribeEngineDefaultClusterParameters 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.DescribeEngineDefaultClusterParameters * @see AWS API Documentation */ @Override public CompletableFuture describeEngineDefaultClusterParameters( DescribeEngineDefaultClusterParametersRequest describeEngineDefaultClusterParametersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEngineDefaultClusterParametersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEngineDefaultClusterParametersRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEngineDefaultClusterParameters"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeEngineDefaultClusterParametersResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEngineDefaultClusterParameters").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeEngineDefaultClusterParametersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeEngineDefaultClusterParametersRequest)); 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 default engine and system parameter information for the specified database engine. *

* * @param describeEngineDefaultParametersRequest * @return A Java Future containing the result of the DescribeEngineDefaultParameters operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. 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.DescribeEngineDefaultParameters * @see AWS API Documentation */ @Override public CompletableFuture describeEngineDefaultParameters( DescribeEngineDefaultParametersRequest describeEngineDefaultParametersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEngineDefaultParametersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEngineDefaultParametersRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEngineDefaultParameters"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeEngineDefaultParametersResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEngineDefaultParameters").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeEngineDefaultParametersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeEngineDefaultParametersRequest)); 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); } } /** *

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

* * @param describeEventCategoriesRequest * @return A Java Future containing the result of the DescribeEventCategories 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.DescribeEventCategories * @see AWS API Documentation */ @Override public CompletableFuture describeEventCategories( DescribeEventCategoriesRequest describeEventCategoriesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEventCategoriesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEventCategoriesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEventCategories"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeEventCategoriesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEventCategories").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeEventCategoriesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeEventCategoriesRequest)); 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); } } /** *

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

*

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

* * @param describeEventSubscriptionsRequest * @return A Java Future containing the result of the DescribeEventSubscriptions 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.
  • *
  • 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.DescribeEventSubscriptions * @see AWS API Documentation */ @Override public CompletableFuture describeEventSubscriptions( DescribeEventSubscriptionsRequest describeEventSubscriptionsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEventSubscriptionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEventSubscriptionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEventSubscriptions"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeEventSubscriptionsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEventSubscriptions").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeEventSubscriptionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeEventSubscriptionsRequest)); 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 events related to DB instances, DB security groups, DB snapshots, and DB parameter groups for the past 14 * days. Events specific to a particular DB instance, DB security group, database snapshot, or DB parameter group * can be obtained by providing the name as a parameter. By default, the past hour of events are returned. *

* * @param describeEventsRequest * @return A Java Future containing the result of the DescribeEvents operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. 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.DescribeEvents * @see AWS API * Documentation */ @Override public CompletableFuture describeEvents(DescribeEventsRequest describeEventsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEventsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEventsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEvents"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeEventsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEvents").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeEventsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeEventsRequest)); 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 Neptune global database clusters. This API supports pagination. *

* * @param describeGlobalClustersRequest * @return A Java Future containing the result of the DescribeGlobalClusters 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.
  • *
  • 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.DescribeGlobalClusters * @see AWS API Documentation */ @Override public CompletableFuture describeGlobalClusters( DescribeGlobalClustersRequest describeGlobalClustersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeGlobalClustersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeGlobalClustersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeGlobalClusters"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeGlobalClustersResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeGlobalClusters").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeGlobalClustersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeGlobalClustersRequest)); 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 orderable DB instance options for the specified engine. *

* * @param describeOrderableDbInstanceOptionsRequest * @return A Java Future containing the result of the DescribeOrderableDBInstanceOptions 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.DescribeOrderableDBInstanceOptions * @see AWS API Documentation */ @Override public CompletableFuture describeOrderableDBInstanceOptions( DescribeOrderableDbInstanceOptionsRequest describeOrderableDbInstanceOptionsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeOrderableDbInstanceOptionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeOrderableDbInstanceOptionsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeOrderableDBInstanceOptions"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeOrderableDbInstanceOptionsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeOrderableDBInstanceOptions").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeOrderableDbInstanceOptionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeOrderableDbInstanceOptionsRequest)); 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 resources (for example, DB instances) that have at least one pending maintenance action. *

* * @param describePendingMaintenanceActionsRequest * @return A Java Future containing the result of the DescribePendingMaintenanceActions 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.DescribePendingMaintenanceActions * @see AWS API Documentation */ @Override public CompletableFuture describePendingMaintenanceActions( DescribePendingMaintenanceActionsRequest describePendingMaintenanceActionsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describePendingMaintenanceActionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describePendingMaintenanceActionsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribePendingMaintenanceActions"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribePendingMaintenanceActionsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribePendingMaintenanceActions").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribePendingMaintenanceActionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describePendingMaintenanceActionsRequest)); 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); } } /** *

* You can call DescribeValidDBInstanceModifications to learn what modifications you can make to your DB * instance. You can use this information when you call ModifyDBInstance. *

* * @param describeValidDbInstanceModificationsRequest * @return A Java Future containing the result of the DescribeValidDBInstanceModifications 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.
  • *
  • 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.DescribeValidDBInstanceModifications * @see AWS API Documentation */ @Override public CompletableFuture describeValidDBInstanceModifications( DescribeValidDbInstanceModificationsRequest describeValidDbInstanceModificationsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeValidDbInstanceModificationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeValidDbInstanceModificationsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeValidDBInstanceModifications"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeValidDbInstanceModificationsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeValidDBInstanceModifications").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeValidDbInstanceModificationsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeValidDbInstanceModificationsRequest)); 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); } } /** *

* Forces a failover for a DB cluster. *

*

* A failover for a DB cluster promotes one of the Read Replicas (read-only instances) in the DB cluster to be the * primary instance (the cluster writer). *

*

* Amazon Neptune will automatically fail over to a Read Replica, if one exists, when the primary instance fails. * You can force a failover when you want to simulate a failure of a primary instance for testing. Because each * instance in a DB cluster has its own endpoint address, you will need to clean up and re-establish any existing * connections that use those endpoint addresses when the failover is complete. *

* * @param failoverDbClusterRequest * @return A Java Future containing the result of the FailoverDBCluster 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.
  • *
  • 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.FailoverDBCluster * @see AWS API * Documentation */ @Override public CompletableFuture failoverDBCluster(FailoverDbClusterRequest failoverDbClusterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(failoverDbClusterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, failoverDbClusterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "FailoverDBCluster"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(FailoverDbClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("FailoverDBCluster").withProtocolMetadata(protocolMetadata) .withMarshaller(new FailoverDbClusterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(failoverDbClusterRequest)); 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); } } /** *

* Initiates the failover process for a Neptune global database. *

*

* A failover for a Neptune global database promotes one of secondary read-only DB clusters to be the primary DB * cluster and demotes the primary DB cluster to being a secondary (read-only) DB cluster. In other words, the role * of the current primary DB cluster and the selected target secondary DB cluster are switched. The selected * secondary DB cluster assumes full read/write capabilities for the Neptune global database. *

* *

* This action applies only to Neptune global databases. This action is only intended for use on healthy * Neptune global databases with healthy Neptune DB clusters and no region-wide outages, to test disaster recovery * scenarios or to reconfigure the global database topology. *

*
* * @param failoverGlobalClusterRequest * @return A Java Future containing the result of the FailoverGlobalCluster 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.
  • *
  • 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.FailoverGlobalCluster * @see AWS * API Documentation */ @Override public CompletableFuture failoverGlobalCluster( FailoverGlobalClusterRequest failoverGlobalClusterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(failoverGlobalClusterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, failoverGlobalClusterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "FailoverGlobalCluster"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(FailoverGlobalClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("FailoverGlobalCluster").withProtocolMetadata(protocolMetadata) .withMarshaller(new FailoverGlobalClusterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(failoverGlobalClusterRequest)); 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); } } /** *

* Lists all tags on an Amazon Neptune resource. *

* * @param listTagsForResourceRequest * @return A Java Future containing the result of the ListTagsForResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. 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.ListTagsForResource * @see AWS * API Documentation */ @Override public CompletableFuture listTagsForResource( ListTagsForResourceRequest listTagsForResourceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTagsForResourceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTagsForResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTagsForResource"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListTagsForResourceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListTagsForResource").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listTagsForResourceRequest)); 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); } } /** *

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

* * @param modifyDbClusterRequest * @return A Java Future containing the result of the ModifyDBCluster 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.
  • *
  • 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.
  • *
  • 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.
  • *
  • DbClusterParameterGroupNotFoundException DBClusterParameterGroupName does not refer to an * existing DB Cluster parameter group.
  • *
  • InvalidDbSecurityGroupStateException The state of the DB security group does not allow deletion.
  • *
  • InvalidDbInstanceStateException The specified DB instance is not in the available state.
  • *
  • DbClusterAlreadyExistsException User already has a DB cluster with the given identifier.
  • *
  • StorageTypeNotSupportedException StorageType specified cannot be associated with the 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.ModifyDBCluster * @see AWS API * Documentation */ @Override public CompletableFuture modifyDBCluster(ModifyDbClusterRequest modifyDbClusterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyDbClusterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyDbClusterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyDBCluster"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyDbClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyDBCluster").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyDbClusterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyDbClusterRequest)); 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); } } /** *

* Modifies the properties of an endpoint in an Amazon Neptune DB cluster. *

* * @param modifyDbClusterEndpointRequest * @return A Java Future containing the result of the ModifyDBClusterEndpoint 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. *
    *
  • InvalidDbClusterStateException The DB cluster is not in a valid state.
  • *
  • 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.
  • *
  • 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.ModifyDBClusterEndpoint * @see AWS API Documentation */ @Override public CompletableFuture modifyDBClusterEndpoint( ModifyDbClusterEndpointRequest modifyDbClusterEndpointRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyDbClusterEndpointRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyDbClusterEndpointRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyDBClusterEndpoint"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyDbClusterEndpointResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyDBClusterEndpoint").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyDbClusterEndpointRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyDbClusterEndpointRequest)); 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); } } /** *

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

* *

* Changes to dynamic parameters are applied immediately. Changes to static parameters require a reboot without * failover to the DB cluster associated with the parameter group before the change can take effect. *

*
*

* After you create a DB cluster parameter group, you should wait at least 5 minutes before creating your first DB * cluster that uses that DB cluster parameter group as the default parameter group. This allows Amazon Neptune to * fully complete the create action before the 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 modifyDbClusterParameterGroupRequest * @return A Java Future containing the result of the ModifyDBClusterParameterGroup 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.
  • *
  • 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.
  • *
  • 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.ModifyDBClusterParameterGroup * @see AWS API Documentation */ @Override public CompletableFuture modifyDBClusterParameterGroup( ModifyDbClusterParameterGroupRequest modifyDbClusterParameterGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyDbClusterParameterGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyDbClusterParameterGroupRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyDBClusterParameterGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyDbClusterParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyDBClusterParameterGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyDbClusterParameterGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyDbClusterParameterGroupRequest)); 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 an attribute and values to, or removes an attribute and values from, a manual DB cluster snapshot. *

*

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

*

* To view which Amazon accounts have access to copy or restore a manual DB cluster snapshot, or whether a manual DB * cluster snapshot public or private, use the DescribeDBClusterSnapshotAttributes API action. *

* * @param modifyDbClusterSnapshotAttributeRequest * @return A Java Future containing the result of the ModifyDBClusterSnapshotAttribute 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.
  • *
  • InvalidDbClusterSnapshotStateException The supplied value is not a valid DB cluster snapshot state.
  • *
  • SharedSnapshotQuotaExceededException You have exceeded the maximum number of accounts that you can * share a manual DB snapshot with.
  • *
  • 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.ModifyDBClusterSnapshotAttribute * @see AWS API Documentation */ @Override public CompletableFuture modifyDBClusterSnapshotAttribute( ModifyDbClusterSnapshotAttributeRequest modifyDbClusterSnapshotAttributeRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyDbClusterSnapshotAttributeRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyDbClusterSnapshotAttributeRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyDBClusterSnapshotAttribute"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyDbClusterSnapshotAttributeResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyDBClusterSnapshotAttribute").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyDbClusterSnapshotAttributeRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyDbClusterSnapshotAttributeRequest)); 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); } } /** *

* Modifies settings for a DB instance. You can change one or more database configuration parameters by specifying * these parameters and the new values in the request. To learn what modifications you can make to your DB instance, * call DescribeValidDBInstanceModifications before you call ModifyDBInstance. *

* * @param modifyDbInstanceRequest * @return A Java Future containing the result of the ModifyDBInstance 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. *
    *
  • InvalidDbInstanceStateException The specified DB instance is not in the available state.
  • *
  • InvalidDbSecurityGroupStateException The state of the DB security group does not allow deletion.
  • *
  • DbInstanceAlreadyExistsException User already has a DB instance with the given identifier.
  • *
  • DbInstanceNotFoundException DBInstanceIdentifier does not refer to an existing DB instance.
  • *
  • DbSecurityGroupNotFoundException DBSecurityGroupName does not refer to an existing DB security * group.
  • *
  • DbParameterGroupNotFoundException DBParameterGroupName does not refer to an existing DB * parameter group.
  • *
  • InsufficientDbInstanceCapacityException Specified DB instance class is not available in the specified * Availability Zone.
  • *
  • StorageQuotaExceededException Request would result in user exceeding the allowed amount of storage * available across all DB instances.
  • *
  • 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.
  • *
  • DbUpgradeDependencyFailureException The DB upgrade failed because a resource the DB depends on could * not be modified.
  • *
  • 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.

  • *
  • CertificateNotFoundException CertificateIdentifier does not refer to an existing certificate.
  • *
  • 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.ModifyDBInstance * @see AWS API * Documentation */ @Override public CompletableFuture modifyDBInstance(ModifyDbInstanceRequest modifyDbInstanceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyDbInstanceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyDbInstanceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyDBInstance"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyDbInstanceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyDBInstance").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyDbInstanceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyDbInstanceRequest)); 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); } } /** *

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

* *

* Changes to dynamic parameters are applied immediately. Changes to static parameters require a reboot without * failover to the DB instance associated with the parameter group before the change can take effect. *

*
*

* After you modify 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 modify 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 modifyDbParameterGroupRequest * @return A Java Future containing the result of the ModifyDBParameterGroup 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.
  • *
  • 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.
  • *
  • 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.ModifyDBParameterGroup * @see AWS API Documentation */ @Override public CompletableFuture modifyDBParameterGroup( ModifyDbParameterGroupRequest modifyDbParameterGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyDbParameterGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyDbParameterGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyDBParameterGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyDbParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyDBParameterGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyDbParameterGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyDbParameterGroupRequest)); 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); } } /** *

* Modifies an existing DB subnet group. DB subnet groups must contain at least one subnet in at least two AZs in * the Amazon Region. *

* * @param modifyDbSubnetGroupRequest * @return A Java Future containing the result of the ModifyDBSubnetGroup 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.
  • *
  • DbSubnetQuotaExceededException Request would result in user exceeding the allowed number of subnets * in a DB subnet groups.
  • *
  • SubnetAlreadyInUseException The DB subnet is already in use in the Availability Zone.
  • *
  • 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.ModifyDBSubnetGroup * @see AWS * API Documentation */ @Override public CompletableFuture modifyDBSubnetGroup( ModifyDbSubnetGroupRequest modifyDbSubnetGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyDbSubnetGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyDbSubnetGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyDBSubnetGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyDbSubnetGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyDBSubnetGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyDbSubnetGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyDbSubnetGroupRequest)); 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); } } /** *

* Modifies an existing event notification subscription. Note that you can't modify the source identifiers using * this call; to change source identifiers for a subscription, use the AddSourceIdentifierToSubscription and * RemoveSourceIdentifierFromSubscription calls. *

*

* You can see a list of the event categories for a given SourceType by using the DescribeEventCategories * action. *

* * @param modifyEventSubscriptionRequest * @return A Java Future containing the result of the ModifyEventSubscription 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.
  • *
  • SubscriptionNotFoundException The designated subscription could not be found.
  • *
  • 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.
  • *
  • 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.ModifyEventSubscription * @see AWS API Documentation */ @Override public CompletableFuture modifyEventSubscription( ModifyEventSubscriptionRequest modifyEventSubscriptionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyEventSubscriptionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyEventSubscriptionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyEventSubscription"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyEventSubscriptionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyEventSubscription").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyEventSubscriptionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyEventSubscriptionRequest)); 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); } } /** *

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

* * @param modifyGlobalClusterRequest * @return A Java Future containing the result of the ModifyGlobalCluster 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.ModifyGlobalCluster * @see AWS * API Documentation */ @Override public CompletableFuture modifyGlobalCluster( ModifyGlobalClusterRequest modifyGlobalClusterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyGlobalClusterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyGlobalClusterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyGlobalCluster"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyGlobalClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyGlobalCluster").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyGlobalClusterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyGlobalClusterRequest)); 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); } } /** *

* Not supported. *

* * @param promoteReadReplicaDbClusterRequest * @return A Java Future containing the result of the PromoteReadReplicaDBCluster 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.
  • *
  • 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.PromoteReadReplicaDBCluster * @see AWS API Documentation */ @Override public CompletableFuture promoteReadReplicaDBCluster( PromoteReadReplicaDbClusterRequest promoteReadReplicaDbClusterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(promoteReadReplicaDbClusterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, promoteReadReplicaDbClusterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PromoteReadReplicaDBCluster"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(PromoteReadReplicaDbClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PromoteReadReplicaDBCluster").withProtocolMetadata(protocolMetadata) .withMarshaller(new PromoteReadReplicaDbClusterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(promoteReadReplicaDbClusterRequest)); 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); } } /** *

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

*

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

* * @param rebootDbInstanceRequest * @return A Java Future containing the result of the RebootDBInstance 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. *
    *
  • InvalidDbInstanceStateException The specified DB instance is not in the available state.
  • *
  • 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.RebootDBInstance * @see AWS API * Documentation */ @Override public CompletableFuture rebootDBInstance(RebootDbInstanceRequest rebootDbInstanceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(rebootDbInstanceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, rebootDbInstanceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RebootDBInstance"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RebootDbInstanceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RebootDBInstance").withProtocolMetadata(protocolMetadata) .withMarshaller(new RebootDbInstanceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(rebootDbInstanceRequest)); 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); } } /** *

* Detaches a Neptune DB cluster from a Neptune global database. A secondary cluster becomes a normal standalone * cluster with read-write capability instead of being read-only, and no longer receives data from a the primary * cluster. *

* * @param removeFromGlobalClusterRequest * @return A Java Future containing the result of the RemoveFromGlobalCluster 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.
  • *
  • 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.RemoveFromGlobalCluster * @see AWS API Documentation */ @Override public CompletableFuture removeFromGlobalCluster( RemoveFromGlobalClusterRequest removeFromGlobalClusterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(removeFromGlobalClusterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, removeFromGlobalClusterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RemoveFromGlobalCluster"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RemoveFromGlobalClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RemoveFromGlobalCluster").withProtocolMetadata(protocolMetadata) .withMarshaller(new RemoveFromGlobalClusterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(removeFromGlobalClusterRequest)); 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); } } /** *

* Disassociates an Identity and Access Management (IAM) role from a DB cluster. *

* * @param removeRoleFromDbClusterRequest * @return A Java Future containing the result of the RemoveRoleFromDBCluster 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.
  • *
  • DbClusterRoleNotFoundException The specified IAM role Amazon Resource Name (ARN) is not associated * with the specified DB cluster.
  • *
  • 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.RemoveRoleFromDBCluster * @see AWS API Documentation */ @Override public CompletableFuture removeRoleFromDBCluster( RemoveRoleFromDbClusterRequest removeRoleFromDbClusterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(removeRoleFromDbClusterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, removeRoleFromDbClusterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RemoveRoleFromDBCluster"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RemoveRoleFromDbClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RemoveRoleFromDBCluster").withProtocolMetadata(protocolMetadata) .withMarshaller(new RemoveRoleFromDbClusterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(removeRoleFromDbClusterRequest)); 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); } } /** *

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

* * @param removeSourceIdentifierFromSubscriptionRequest * @return A Java Future containing the result of the RemoveSourceIdentifierFromSubscription 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.RemoveSourceIdentifierFromSubscription * @see AWS API Documentation */ @Override public CompletableFuture removeSourceIdentifierFromSubscription( RemoveSourceIdentifierFromSubscriptionRequest removeSourceIdentifierFromSubscriptionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(removeSourceIdentifierFromSubscriptionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, removeSourceIdentifierFromSubscriptionRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RemoveSourceIdentifierFromSubscription"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RemoveSourceIdentifierFromSubscriptionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RemoveSourceIdentifierFromSubscription").withProtocolMetadata(protocolMetadata) .withMarshaller(new RemoveSourceIdentifierFromSubscriptionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(removeSourceIdentifierFromSubscriptionRequest)); 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); } } /** *

* Removes metadata tags from an Amazon Neptune resource. *

* * @param removeTagsFromResourceRequest * @return A Java Future containing the result of the RemoveTagsFromResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. 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.RemoveTagsFromResource * @see AWS API Documentation */ @Override public CompletableFuture removeTagsFromResource( RemoveTagsFromResourceRequest removeTagsFromResourceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(removeTagsFromResourceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, removeTagsFromResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RemoveTagsFromResource"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RemoveTagsFromResourceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RemoveTagsFromResource").withProtocolMetadata(protocolMetadata) .withMarshaller(new RemoveTagsFromResourceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(removeTagsFromResourceRequest)); 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); } } /** *

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

*

* When resetting the entire group, dynamic parameters are updated immediately and static parameters are set to * pending-reboot to take effect on the next DB instance restart or RebootDBInstance request. * You must call RebootDBInstance for every DB instance in your DB cluster that you want the updated static * parameter to apply to. *

* * @param resetDbClusterParameterGroupRequest * @return A Java Future containing the result of the ResetDBClusterParameterGroup 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.ResetDBClusterParameterGroup * @see AWS API Documentation */ @Override public CompletableFuture resetDBClusterParameterGroup( ResetDbClusterParameterGroupRequest resetDbClusterParameterGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(resetDbClusterParameterGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, resetDbClusterParameterGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ResetDBClusterParameterGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ResetDbClusterParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ResetDBClusterParameterGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new ResetDbClusterParameterGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(resetDbClusterParameterGroupRequest)); 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); } } /** *

* Modifies the parameters of a DB parameter group to the engine/system default value. To reset specific parameters, * provide a list of the following: ParameterName and ApplyMethod. To reset the entire DB * parameter group, specify the DBParameterGroup name and ResetAllParameters parameters. * When resetting the entire group, dynamic parameters are updated immediately and static parameters are set to * pending-reboot to take effect on the next DB instance restart or RebootDBInstance * request. *

* * @param resetDbParameterGroupRequest * @return A Java Future containing the result of the ResetDBParameterGroup 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.ResetDBParameterGroup * @see AWS * API Documentation */ @Override public CompletableFuture resetDBParameterGroup( ResetDbParameterGroupRequest resetDbParameterGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(resetDbParameterGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, resetDbParameterGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ResetDBParameterGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ResetDbParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ResetDBParameterGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new ResetDbParameterGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(resetDbParameterGroupRequest)); 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 from a DB snapshot or DB cluster snapshot. *

*

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

*

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

* * @param restoreDbClusterFromSnapshotRequest * @return A Java Future containing the result of the RestoreDBClusterFromSnapshot 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.
  • *
  • 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.
  • *
  • DbSnapshotNotFoundException DBSnapshotIdentifier does not refer to an existing DB snapshot.
  • *
  • DbClusterSnapshotNotFoundException DBClusterSnapshotIdentifier does not refer to an existing * DB cluster snapshot.
  • *
  • InsufficientDbClusterCapacityException The DB cluster does not have enough capacity for the current * operation.
  • *
  • 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.
  • *
  • InvalidDbSnapshotStateException The state of the DB snapshot does not allow deletion.
  • *
  • InvalidDbClusterSnapshotStateException The supplied value is not a valid DB cluster snapshot state.
  • *
  • StorageQuotaExceededException Request would result in user exceeding the allowed amount of storage * available across all DB instances.
  • *
  • InvalidVpcNetworkStateException DB subnet group does not cover all Availability Zones after it is * created because users' change.
  • *
  • InvalidRestoreException Cannot restore from vpc backup to non-vpc DB instance.
  • *
  • DbSubnetGroupNotFoundException DBSubnetGroupName does not refer to an existing DB subnet * group.
  • *
  • InvalidSubnetException The requested subnet is invalid, or multiple subnets were requested that are * not all in a common VPC.
  • *
  • OptionGroupNotFoundException The designated option group could not be found.
  • *
  • KmsKeyNotAccessibleException Error accessing KMS key.
  • *
  • DbClusterParameterGroupNotFoundException DBClusterParameterGroupName does not refer to an * existing DB Cluster 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.RestoreDBClusterFromSnapshot * @see AWS API Documentation */ @Override public CompletableFuture restoreDBClusterFromSnapshot( RestoreDbClusterFromSnapshotRequest restoreDbClusterFromSnapshotRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(restoreDbClusterFromSnapshotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, restoreDbClusterFromSnapshotRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RestoreDBClusterFromSnapshot"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RestoreDbClusterFromSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RestoreDBClusterFromSnapshot").withProtocolMetadata(protocolMetadata) .withMarshaller(new RestoreDbClusterFromSnapshotRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(restoreDbClusterFromSnapshotRequest)); 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); } } /** *

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

* *

* This action only restores the DB cluster, not the DB instances for that DB cluster. You must invoke the * CreateDBInstance action to create DB instances for the restored DB cluster, specifying the identifier of * the restored DB cluster in DBClusterIdentifier. You can create DB instances only after the * RestoreDBClusterToPointInTime action has completed and the DB cluster is available. *

*
* * @param restoreDbClusterToPointInTimeRequest * @return A Java Future containing the result of the RestoreDBClusterToPointInTime 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.
  • *
  • DbClusterNotFoundException DBClusterIdentifier does not refer to an existing DB cluster.
  • *
  • DbClusterQuotaExceededException User attempted to create a new DB cluster and the user has already * reached the maximum allowed DB cluster quota.
  • *
  • DbClusterSnapshotNotFoundException DBClusterSnapshotIdentifier does not refer to an existing * DB cluster snapshot.
  • *
  • DbSubnetGroupNotFoundException DBSubnetGroupName does not refer to an existing DB subnet * group.
  • *
  • InsufficientDbClusterCapacityException The DB cluster does not have enough capacity for the current * operation.
  • *
  • 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.
  • *
  • InvalidDbClusterSnapshotStateException The supplied value is not a valid DB cluster snapshot state.
  • *
  • InvalidDbClusterStateException The DB cluster is not in a valid state.
  • *
  • InvalidDbSnapshotStateException The state of the DB snapshot does not allow deletion.
  • *
  • InvalidRestoreException Cannot restore from vpc backup to non-vpc DB instance.
  • *
  • 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.
  • *
  • KmsKeyNotAccessibleException Error accessing KMS key.
  • *
  • OptionGroupNotFoundException The designated option group could not be found.
  • *
  • StorageQuotaExceededException Request would result in user exceeding the allowed amount of storage * available across all DB instances.
  • *
  • DbClusterParameterGroupNotFoundException DBClusterParameterGroupName does not refer to an * existing DB Cluster 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.RestoreDBClusterToPointInTime * @see AWS API Documentation */ @Override public CompletableFuture restoreDBClusterToPointInTime( RestoreDbClusterToPointInTimeRequest restoreDbClusterToPointInTimeRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(restoreDbClusterToPointInTimeRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, restoreDbClusterToPointInTimeRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RestoreDBClusterToPointInTime"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RestoreDbClusterToPointInTimeResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RestoreDBClusterToPointInTime").withProtocolMetadata(protocolMetadata) .withMarshaller(new RestoreDbClusterToPointInTimeRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(restoreDbClusterToPointInTimeRequest)); 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); } } /** *

* Starts an Amazon Neptune DB cluster that was stopped using the Amazon console, the Amazon CLI stop-db-cluster * command, or the StopDBCluster API. *

* * @param startDbClusterRequest * @return A Java Future containing the result of the StartDBCluster 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.
  • *
  • 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.StartDBCluster * @see AWS API * Documentation */ @Override public CompletableFuture startDBCluster(StartDbClusterRequest startDbClusterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startDbClusterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startDbClusterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartDBCluster"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(StartDbClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StartDBCluster").withProtocolMetadata(protocolMetadata) .withMarshaller(new StartDbClusterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(startDbClusterRequest)); 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); } } /** *

* Stops an Amazon Neptune DB cluster. When you stop a DB cluster, Neptune retains the DB cluster's metadata, * including its endpoints and DB parameter groups. *

*

* Neptune also retains the transaction logs so you can do a point-in-time restore if necessary. *

* * @param stopDbClusterRequest * @return A Java Future containing the result of the StopDBCluster 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.
  • *
  • 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.StopDBCluster * @see AWS API * Documentation */ @Override public CompletableFuture stopDBCluster(StopDbClusterRequest stopDbClusterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(stopDbClusterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, stopDbClusterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Neptune"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StopDBCluster"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(StopDbClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StopDBCluster").withProtocolMetadata(protocolMetadata) .withMarshaller(new StopDbClusterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(stopDbClusterRequest)); 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); } } @Override public NeptuneAsyncWaiter waiter() { return NeptuneAsyncWaiter.builder().client(this).scheduledExecutorService(executorService).build(); } @Override public final NeptuneServiceClientConfiguration serviceClientConfiguration() { return new NeptuneServiceClientConfigurationBuilder(this.clientConfiguration.toBuilder()).build(); } @Override public final String serviceName() { return SERVICE_NAME; } private AwsQueryProtocolFactory init() { return AwsQueryProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("DBParameterGroupNotFound") .exceptionBuilderSupplier(DbParameterGroupNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBClusterQuotaExceededFault") .exceptionBuilderSupplier(DbClusterQuotaExceededException::builder).httpStatusCode(403).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBClusterRoleNotFound") .exceptionBuilderSupplier(DbClusterRoleNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SubscriptionCategoryNotFound") .exceptionBuilderSupplier(SubscriptionCategoryNotFoundException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidRestoreFault") .exceptionBuilderSupplier(InvalidRestoreException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InsufficientDBClusterCapacityFault") .exceptionBuilderSupplier(InsufficientDbClusterCapacityException::builder).httpStatusCode(403) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBInstanceNotFound") .exceptionBuilderSupplier(DbInstanceNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBSubnetGroupDoesNotCoverEnoughAZs") .exceptionBuilderSupplier(DbSubnetGroupDoesNotCoverEnoughAZsException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBSubnetGroupQuotaExceeded") .exceptionBuilderSupplier(DbSubnetGroupQuotaExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("KMSKeyNotAccessibleFault") .exceptionBuilderSupplier(KmsKeyNotAccessibleException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBClusterRoleQuotaExceeded") .exceptionBuilderSupplier(DbClusterRoleQuotaExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidVPCNetworkStateFault") .exceptionBuilderSupplier(InvalidVpcNetworkStateException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("CertificateNotFound") .exceptionBuilderSupplier(CertificateNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidDBSecurityGroupState") .exceptionBuilderSupplier(InvalidDbSecurityGroupStateException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceNotFoundFault") .exceptionBuilderSupplier(ResourceNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBParameterGroupQuotaExceeded") .exceptionBuilderSupplier(DbParameterGroupQuotaExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("StorageTypeNotSupported") .exceptionBuilderSupplier(StorageTypeNotSupportedException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SubscriptionNotFound") .exceptionBuilderSupplier(SubscriptionNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InsufficientStorageClusterCapacity") .exceptionBuilderSupplier(InsufficientStorageClusterCapacityException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBInstanceAlreadyExists") .exceptionBuilderSupplier(DbInstanceAlreadyExistsException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SubnetAlreadyInUse") .exceptionBuilderSupplier(SubnetAlreadyInUseException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("GlobalClusterNotFoundFault") .exceptionBuilderSupplier(GlobalClusterNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBSubnetGroupAlreadyExists") .exceptionBuilderSupplier(DbSubnetGroupAlreadyExistsException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBClusterAlreadyExistsFault") .exceptionBuilderSupplier(DbClusterAlreadyExistsException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBClusterRoleAlreadyExists") .exceptionBuilderSupplier(DbClusterRoleAlreadyExistsException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidEventSubscriptionState") .exceptionBuilderSupplier(InvalidEventSubscriptionStateException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidDBSnapshotState") .exceptionBuilderSupplier(InvalidDbSnapshotStateException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidSubnet") .exceptionBuilderSupplier(InvalidSubnetException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SNSTopicArnNotFound") .exceptionBuilderSupplier(SnsTopicArnNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InstanceQuotaExceeded") .exceptionBuilderSupplier(InstanceQuotaExceededException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBClusterNotFoundFault") .exceptionBuilderSupplier(DbClusterNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SnapshotQuotaExceeded") .exceptionBuilderSupplier(SnapshotQuotaExceededException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("GlobalClusterQuotaExceededFault") .exceptionBuilderSupplier(GlobalClusterQuotaExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidDBSubnetStateFault") .exceptionBuilderSupplier(InvalidDbSubnetStateException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("GlobalClusterAlreadyExistsFault") .exceptionBuilderSupplier(GlobalClusterAlreadyExistsException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SharedSnapshotQuotaExceeded") .exceptionBuilderSupplier(SharedSnapshotQuotaExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBSnapshotAlreadyExists") .exceptionBuilderSupplier(DbSnapshotAlreadyExistsException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBClusterSnapshotAlreadyExistsFault") .exceptionBuilderSupplier(DbClusterSnapshotAlreadyExistsException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidGlobalClusterStateFault") .exceptionBuilderSupplier(InvalidGlobalClusterStateException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidDBClusterStateFault") .exceptionBuilderSupplier(InvalidDbClusterStateException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidDBSubnetGroupStateFault") .exceptionBuilderSupplier(InvalidDbSubnetGroupStateException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBClusterParameterGroupNotFound") .exceptionBuilderSupplier(DbClusterParameterGroupNotFoundException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBSubnetQuotaExceededFault") .exceptionBuilderSupplier(DbSubnetQuotaExceededException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SNSInvalidTopic") .exceptionBuilderSupplier(SnsInvalidTopicException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBSubnetGroupNotFoundFault") .exceptionBuilderSupplier(DbSubnetGroupNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBUpgradeDependencyFailure") .exceptionBuilderSupplier(DbUpgradeDependencyFailureException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ProvisionedIopsNotAvailableInAZFault") .exceptionBuilderSupplier(ProvisionedIopsNotAvailableInAzException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidDBClusterSnapshotStateFault") .exceptionBuilderSupplier(InvalidDbClusterSnapshotStateException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBSecurityGroupNotFound") .exceptionBuilderSupplier(DbSecurityGroupNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBClusterEndpointAlreadyExistsFault") .exceptionBuilderSupplier(DbClusterEndpointAlreadyExistsException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InsufficientDBInstanceCapacity") .exceptionBuilderSupplier(InsufficientDbInstanceCapacityException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBParameterGroupAlreadyExists") .exceptionBuilderSupplier(DbParameterGroupAlreadyExistsException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SNSNoAuthorization") .exceptionBuilderSupplier(SnsNoAuthorizationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBClusterEndpointQuotaExceededFault") .exceptionBuilderSupplier(DbClusterEndpointQuotaExceededException::builder).httpStatusCode(403) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBSnapshotNotFound") .exceptionBuilderSupplier(DbSnapshotNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SubscriptionAlreadyExist") .exceptionBuilderSupplier(SubscriptionAlreadyExistException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("OptionGroupNotFoundFault") .exceptionBuilderSupplier(OptionGroupNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBClusterSnapshotNotFoundFault") .exceptionBuilderSupplier(DbClusterSnapshotNotFoundException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SourceNotFound") .exceptionBuilderSupplier(SourceNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidDBInstanceState") .exceptionBuilderSupplier(InvalidDbInstanceStateException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DomainNotFoundFault") .exceptionBuilderSupplier(DomainNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("EventSubscriptionQuotaExceeded") .exceptionBuilderSupplier(EventSubscriptionQuotaExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DBClusterEndpointNotFoundFault") .exceptionBuilderSupplier(DbClusterEndpointNotFoundException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("StorageQuotaExceeded") .exceptionBuilderSupplier(StorageQuotaExceededException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidDBClusterEndpointStateFault") .exceptionBuilderSupplier(InvalidDbClusterEndpointStateException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidDBParameterGroupState") .exceptionBuilderSupplier(InvalidDbParameterGroupStateException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AuthorizationNotFound") .exceptionBuilderSupplier(AuthorizationNotFoundException::builder).httpStatusCode(404).build()) .clientConfiguration(clientConfiguration).defaultServiceExceptionSupplier(NeptuneException::builder).build(); } private static List resolveMetricPublishers(SdkClientConfiguration clientConfiguration, RequestOverrideConfiguration requestOverrideConfiguration) { List publishers = null; if (requestOverrideConfiguration != null) { publishers = requestOverrideConfiguration.metricPublishers(); } if (publishers == null || publishers.isEmpty()) { publishers = clientConfiguration.option(SdkClientOption.METRIC_PUBLISHERS); } if (publishers == null) { publishers = Collections.emptyList(); } return publishers; } private void updateRetryStrategyClientConfiguration(SdkClientConfiguration.Builder configuration) { ClientOverrideConfiguration.Builder builder = configuration.asOverrideConfigurationBuilder(); RetryMode retryMode = builder.retryMode(); if (retryMode != null) { configuration.option(SdkClientOption.RETRY_STRATEGY, AwsRetryStrategy.forRetryMode(retryMode)); } else { Consumer> configurator = builder.retryStrategyConfigurator(); if (configurator != null) { RetryStrategy.Builder defaultBuilder = AwsRetryStrategy.defaultRetryStrategy().toBuilder(); configurator.accept(defaultBuilder); configuration.option(SdkClientOption.RETRY_STRATEGY, defaultBuilder.build()); } else { RetryStrategy retryStrategy = builder.retryStrategy(); if (retryStrategy != null) { configuration.option(SdkClientOption.RETRY_STRATEGY, retryStrategy); } } } configuration.option(SdkClientOption.CONFIGURED_RETRY_MODE, null); configuration.option(SdkClientOption.CONFIGURED_RETRY_STRATEGY, null); configuration.option(SdkClientOption.CONFIGURED_RETRY_CONFIGURATOR, null); } private SdkClientConfiguration updateSdkClientConfiguration(SdkRequest request, SdkClientConfiguration clientConfiguration) { List plugins = request.overrideConfiguration().map(c -> c.plugins()).orElse(Collections.emptyList()); SdkClientConfiguration.Builder configuration = clientConfiguration.toBuilder(); if (plugins.isEmpty()) { return configuration.build(); } NeptuneServiceClientConfigurationBuilder serviceConfigBuilder = new NeptuneServiceClientConfigurationBuilder( configuration); for (SdkPlugin plugin : plugins) { plugin.configureClient(serviceConfigBuilder); } updateRetryStrategyClientConfiguration(configuration); return configuration.build(); } @Override public void close() { clientHandler.close(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy