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

software.amazon.awssdk.services.neptune.DefaultNeptuneClient 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.39
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.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.ApiName;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.client.handler.SyncClientHandler;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.util.VersionInfo;
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.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.NeptuneRequest;
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.paginators.DescribeDBClusterEndpointsIterable;
import software.amazon.awssdk.services.neptune.paginators.DescribeDBClusterParameterGroupsIterable;
import software.amazon.awssdk.services.neptune.paginators.DescribeDBClusterParametersIterable;
import software.amazon.awssdk.services.neptune.paginators.DescribeDBClusterSnapshotsIterable;
import software.amazon.awssdk.services.neptune.paginators.DescribeDBClustersIterable;
import software.amazon.awssdk.services.neptune.paginators.DescribeDBEngineVersionsIterable;
import software.amazon.awssdk.services.neptune.paginators.DescribeDBInstancesIterable;
import software.amazon.awssdk.services.neptune.paginators.DescribeDBParameterGroupsIterable;
import software.amazon.awssdk.services.neptune.paginators.DescribeDBParametersIterable;
import software.amazon.awssdk.services.neptune.paginators.DescribeDBSubnetGroupsIterable;
import software.amazon.awssdk.services.neptune.paginators.DescribeEngineDefaultParametersIterable;
import software.amazon.awssdk.services.neptune.paginators.DescribeEventSubscriptionsIterable;
import software.amazon.awssdk.services.neptune.paginators.DescribeEventsIterable;
import software.amazon.awssdk.services.neptune.paginators.DescribeOrderableDBInstanceOptionsIterable;
import software.amazon.awssdk.services.neptune.paginators.DescribePendingMaintenanceActionsIterable;
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.NeptuneWaiter;
import software.amazon.awssdk.utils.Logger;

/**
 * Internal implementation of {@link NeptuneClient}.
 *
 * @see NeptuneClient#builder()
 */
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultNeptuneClient implements NeptuneClient {
    private static final Logger log = Logger.loggerFor(DefaultNeptuneClient.class);

    private final SyncClientHandler clientHandler;

    private final AwsQueryProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

    protected DefaultNeptuneClient(SdkClientConfiguration clientConfiguration) {
        this.clientHandler = new AwsSyncClientHandler(clientConfiguration);
        this.clientConfiguration = clientConfiguration;
        this.protocolFactory = init();
    }

    @Override
    public final String serviceName() {
        return SERVICE_NAME;
    }

    /**
     * 

* Associates an Identity and Access Management (IAM) role with an Neptune DB cluster. *

* * @param addRoleToDbClusterRequest * @return Result of the AddRoleToDBCluster operation returned by the service. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws DbClusterRoleAlreadyExistsException * The specified IAM role Amazon Resource Name (ARN) is already associated with the specified DB cluster. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws DbClusterRoleQuotaExceededException * You have exceeded the maximum number of IAM roles that can be associated with the specified DB cluster. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.AddRoleToDBCluster * @see AWS * API Documentation */ @Override public AddRoleToDbClusterResponse addRoleToDBCluster(AddRoleToDbClusterRequest addRoleToDbClusterRequest) throws DbClusterNotFoundException, DbClusterRoleAlreadyExistsException, InvalidDbClusterStateException, DbClusterRoleQuotaExceededException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(AddRoleToDbClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("AddRoleToDBCluster").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(addRoleToDbClusterRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new AddRoleToDbClusterRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param addSourceIdentifierToSubscriptionRequest * @return Result of the AddSourceIdentifierToSubscription operation returned by the service. * @throws SubscriptionNotFoundException * The designated subscription could not be found. * @throws SourceNotFoundException * The source could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.AddSourceIdentifierToSubscription * @see AWS API Documentation */ @Override public AddSourceIdentifierToSubscriptionResponse addSourceIdentifierToSubscription( AddSourceIdentifierToSubscriptionRequest addSourceIdentifierToSubscriptionRequest) throws SubscriptionNotFoundException, SourceNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(AddSourceIdentifierToSubscriptionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("AddSourceIdentifierToSubscription").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(addSourceIdentifierToSubscriptionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new AddSourceIdentifierToSubscriptionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the AddTagsToResource operation returned by the service. * @throws DbInstanceNotFoundException * DBInstanceIdentifier does not refer to an existing DB instance. * @throws DbSnapshotNotFoundException * DBSnapshotIdentifier does not refer to an existing DB snapshot. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.AddTagsToResource * @see AWS API * Documentation */ @Override public AddTagsToResourceResponse addTagsToResource(AddTagsToResourceRequest addTagsToResourceRequest) throws DbInstanceNotFoundException, DbSnapshotNotFoundException, DbClusterNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(AddTagsToResourceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("AddTagsToResource").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(addTagsToResourceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new AddTagsToResourceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Applies a pending maintenance action to a resource (for example, to a DB instance). *

* * @param applyPendingMaintenanceActionRequest * @return Result of the ApplyPendingMaintenanceAction operation returned by the service. * @throws ResourceNotFoundException * The specified resource ID was not found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.ApplyPendingMaintenanceAction * @see AWS API Documentation */ @Override public ApplyPendingMaintenanceActionResponse applyPendingMaintenanceAction( ApplyPendingMaintenanceActionRequest applyPendingMaintenanceActionRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ApplyPendingMaintenanceActionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ApplyPendingMaintenanceAction").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(applyPendingMaintenanceActionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ApplyPendingMaintenanceActionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Copies the specified DB cluster parameter group. *

* * @param copyDbClusterParameterGroupRequest * @return Result of the CopyDBClusterParameterGroup operation returned by the service. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws DbParameterGroupQuotaExceededException * Request would result in user exceeding the allowed number of DB parameter groups. * @throws DbParameterGroupAlreadyExistsException * A DB parameter group with the same name exists. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.CopyDBClusterParameterGroup * @see AWS API Documentation */ @Override public CopyDbClusterParameterGroupResponse copyDBClusterParameterGroup( CopyDbClusterParameterGroupRequest copyDbClusterParameterGroupRequest) throws DbParameterGroupNotFoundException, DbParameterGroupQuotaExceededException, DbParameterGroupAlreadyExistsException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CopyDbClusterParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CopyDBClusterParameterGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(copyDbClusterParameterGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CopyDbClusterParameterGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the CopyDBClusterSnapshot operation returned by the service. * @throws DbClusterSnapshotAlreadyExistsException * User already has a DB cluster snapshot with the given identifier. * @throws DbClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws InvalidDbClusterSnapshotStateException * The supplied value is not a valid DB cluster snapshot state. * @throws SnapshotQuotaExceededException * Request would result in user exceeding the allowed number of DB snapshots. * @throws KmsKeyNotAccessibleException * Error accessing KMS key. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.CopyDBClusterSnapshot * @see AWS * API Documentation */ @Override public CopyDbClusterSnapshotResponse copyDBClusterSnapshot(CopyDbClusterSnapshotRequest copyDbClusterSnapshotRequest) throws DbClusterSnapshotAlreadyExistsException, DbClusterSnapshotNotFoundException, InvalidDbClusterStateException, InvalidDbClusterSnapshotStateException, SnapshotQuotaExceededException, KmsKeyNotAccessibleException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CopyDbClusterSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CopyDBClusterSnapshot").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(copyDbClusterSnapshotRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CopyDbClusterSnapshotRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Copies the specified DB parameter group. *

* * @param copyDbParameterGroupRequest * @return Result of the CopyDBParameterGroup operation returned by the service. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws DbParameterGroupAlreadyExistsException * A DB parameter group with the same name exists. * @throws DbParameterGroupQuotaExceededException * Request would result in user exceeding the allowed number of DB parameter groups. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.CopyDBParameterGroup * @see AWS * API Documentation */ @Override public CopyDbParameterGroupResponse copyDBParameterGroup(CopyDbParameterGroupRequest copyDbParameterGroupRequest) throws DbParameterGroupNotFoundException, DbParameterGroupAlreadyExistsException, DbParameterGroupQuotaExceededException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CopyDbParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CopyDBParameterGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(copyDbParameterGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CopyDbParameterGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the CreateDBCluster operation returned by the service. * @throws DbClusterAlreadyExistsException * User already has a DB cluster with the given identifier. * @throws 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. * @throws DbClusterQuotaExceededException * User attempted to create a new DB cluster and the user has already reached the maximum allowed DB cluster * quota. * @throws StorageQuotaExceededException * Request would result in user exceeding the allowed amount of storage available across all DB instances. * @throws DbSubnetGroupNotFoundException * DBSubnetGroupName does not refer to an existing DB subnet group. * @throws InvalidVpcNetworkStateException * DB subnet group does not cover all Availability Zones after it is created because users' change. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws InvalidDbSubnetGroupStateException * The DB subnet group cannot be deleted because it is in use. * @throws InvalidSubnetException * The requested subnet is invalid, or multiple subnets were requested that are not all in a common VPC. * @throws InvalidDbInstanceStateException * The specified DB instance is not in the available state. * @throws DbClusterParameterGroupNotFoundException * DBClusterParameterGroupName does not refer to an existing DB Cluster parameter group. * @throws KmsKeyNotAccessibleException * Error accessing KMS key. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws DbInstanceNotFoundException * DBInstanceIdentifier does not refer to an existing DB instance. * @throws DbSubnetGroupDoesNotCoverEnoughAZsException * Subnets in the DB subnet group should cover at least two Availability Zones unless there is only one * Availability Zone. * @throws GlobalClusterNotFoundException * The GlobalClusterIdentifier doesn't refer to an existing global database cluster. * @throws InvalidGlobalClusterStateException * The global cluster is in an invalid state and can't perform the requested operation. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.CreateDBCluster * @see AWS API * Documentation */ @Override public CreateDbClusterResponse createDBCluster(CreateDbClusterRequest createDbClusterRequest) throws DbClusterAlreadyExistsException, InsufficientStorageClusterCapacityException, DbClusterQuotaExceededException, StorageQuotaExceededException, DbSubnetGroupNotFoundException, InvalidVpcNetworkStateException, InvalidDbClusterStateException, InvalidDbSubnetGroupStateException, InvalidSubnetException, InvalidDbInstanceStateException, DbClusterParameterGroupNotFoundException, KmsKeyNotAccessibleException, DbClusterNotFoundException, DbInstanceNotFoundException, DbSubnetGroupDoesNotCoverEnoughAZsException, GlobalClusterNotFoundException, InvalidGlobalClusterStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateDbClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateDBCluster").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createDbClusterRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateDbClusterRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a new custom endpoint and associates it with an Amazon Neptune DB cluster. *

* * @param createDbClusterEndpointRequest * @return Result of the CreateDBClusterEndpoint operation returned by the service. * @throws DbClusterEndpointQuotaExceededException * The cluster already has the maximum number of custom endpoints. * @throws DbClusterEndpointAlreadyExistsException * The specified custom endpoint cannot be created because it already exists. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws DbInstanceNotFoundException * DBInstanceIdentifier does not refer to an existing DB instance. * @throws InvalidDbInstanceStateException * The specified DB instance is not in the available state. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.CreateDBClusterEndpoint * @see AWS API Documentation */ @Override public CreateDbClusterEndpointResponse createDBClusterEndpoint(CreateDbClusterEndpointRequest createDbClusterEndpointRequest) throws DbClusterEndpointQuotaExceededException, DbClusterEndpointAlreadyExistsException, DbClusterNotFoundException, InvalidDbClusterStateException, DbInstanceNotFoundException, InvalidDbInstanceStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateDbClusterEndpointResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateDBClusterEndpoint").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createDbClusterEndpointRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateDbClusterEndpointRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the CreateDBClusterParameterGroup operation returned by the service. * @throws DbParameterGroupQuotaExceededException * Request would result in user exceeding the allowed number of DB parameter groups. * @throws DbParameterGroupAlreadyExistsException * A DB parameter group with the same name exists. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.CreateDBClusterParameterGroup * @see AWS API Documentation */ @Override public CreateDbClusterParameterGroupResponse createDBClusterParameterGroup( CreateDbClusterParameterGroupRequest createDbClusterParameterGroupRequest) throws DbParameterGroupQuotaExceededException, DbParameterGroupAlreadyExistsException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateDbClusterParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateDBClusterParameterGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createDbClusterParameterGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateDbClusterParameterGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a snapshot of a DB cluster. *

* * @param createDbClusterSnapshotRequest * @return Result of the CreateDBClusterSnapshot operation returned by the service. * @throws DbClusterSnapshotAlreadyExistsException * User already has a DB cluster snapshot with the given identifier. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws SnapshotQuotaExceededException * Request would result in user exceeding the allowed number of DB snapshots. * @throws InvalidDbClusterSnapshotStateException * The supplied value is not a valid DB cluster snapshot state. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.CreateDBClusterSnapshot * @see AWS API Documentation */ @Override public CreateDbClusterSnapshotResponse createDBClusterSnapshot(CreateDbClusterSnapshotRequest createDbClusterSnapshotRequest) throws DbClusterSnapshotAlreadyExistsException, InvalidDbClusterStateException, DbClusterNotFoundException, SnapshotQuotaExceededException, InvalidDbClusterSnapshotStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateDbClusterSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateDBClusterSnapshot").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createDbClusterSnapshotRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateDbClusterSnapshotRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a new DB instance. *

* * @param createDbInstanceRequest * @return Result of the CreateDBInstance operation returned by the service. * @throws DbInstanceAlreadyExistsException * User already has a DB instance with the given identifier. * @throws InsufficientDbInstanceCapacityException * Specified DB instance class is not available in the specified Availability Zone. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws DbSecurityGroupNotFoundException * DBSecurityGroupName does not refer to an existing DB security group. * @throws InstanceQuotaExceededException * Request would result in user exceeding the allowed number of DB instances. * @throws StorageQuotaExceededException * Request would result in user exceeding the allowed amount of storage available across all DB instances. * @throws DbSubnetGroupNotFoundException * DBSubnetGroupName does not refer to an existing DB subnet group. * @throws DbSubnetGroupDoesNotCoverEnoughAZsException * Subnets in the DB subnet group should cover at least two Availability Zones unless there is only one * Availability Zone. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws InvalidSubnetException * The requested subnet is invalid, or multiple subnets were requested that are not all in a common VPC. * @throws InvalidVpcNetworkStateException * DB subnet group does not cover all Availability Zones after it is created because users' change. * @throws ProvisionedIopsNotAvailableInAzException * Provisioned IOPS not available in the specified Availability Zone. * @throws OptionGroupNotFoundException * The designated option group could not be found. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws StorageTypeNotSupportedException * StorageType specified cannot be associated with the DB Instance. * @throws 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. * @throws KmsKeyNotAccessibleException * Error accessing KMS key. * @throws DomainNotFoundException * Domain does not refer to an existing Active Directory Domain. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.CreateDBInstance * @see AWS API * Documentation */ @Override public CreateDbInstanceResponse createDBInstance(CreateDbInstanceRequest createDbInstanceRequest) throws DbInstanceAlreadyExistsException, InsufficientDbInstanceCapacityException, DbParameterGroupNotFoundException, DbSecurityGroupNotFoundException, InstanceQuotaExceededException, StorageQuotaExceededException, DbSubnetGroupNotFoundException, DbSubnetGroupDoesNotCoverEnoughAZsException, InvalidDbClusterStateException, InvalidSubnetException, InvalidVpcNetworkStateException, ProvisionedIopsNotAvailableInAzException, OptionGroupNotFoundException, DbClusterNotFoundException, StorageTypeNotSupportedException, AuthorizationNotFoundException, KmsKeyNotAccessibleException, DomainNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateDbInstanceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateDBInstance").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createDbInstanceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateDbInstanceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the CreateDBParameterGroup operation returned by the service. * @throws DbParameterGroupQuotaExceededException * Request would result in user exceeding the allowed number of DB parameter groups. * @throws DbParameterGroupAlreadyExistsException * A DB parameter group with the same name exists. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.CreateDBParameterGroup * @see AWS API Documentation */ @Override public CreateDbParameterGroupResponse createDBParameterGroup(CreateDbParameterGroupRequest createDbParameterGroupRequest) throws DbParameterGroupQuotaExceededException, DbParameterGroupAlreadyExistsException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateDbParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateDBParameterGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createDbParameterGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateDbParameterGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the CreateDBSubnetGroup operation returned by the service. * @throws DbSubnetGroupAlreadyExistsException * DBSubnetGroupName is already used by an existing DB subnet group. * @throws DbSubnetGroupQuotaExceededException * Request would result in user exceeding the allowed number of DB subnet groups. * @throws DbSubnetQuotaExceededException * Request would result in user exceeding the allowed number of subnets in a DB subnet groups. * @throws DbSubnetGroupDoesNotCoverEnoughAZsException * Subnets in the DB subnet group should cover at least two Availability Zones unless there is only one * Availability Zone. * @throws InvalidSubnetException * The requested subnet is invalid, or multiple subnets were requested that are not all in a common VPC. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.CreateDBSubnetGroup * @see AWS * API Documentation */ @Override public CreateDbSubnetGroupResponse createDBSubnetGroup(CreateDbSubnetGroupRequest createDbSubnetGroupRequest) throws DbSubnetGroupAlreadyExistsException, DbSubnetGroupQuotaExceededException, DbSubnetQuotaExceededException, DbSubnetGroupDoesNotCoverEnoughAZsException, InvalidSubnetException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateDbSubnetGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateDBSubnetGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createDbSubnetGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateDbSubnetGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the CreateEventSubscription operation returned by the service. * @throws EventSubscriptionQuotaExceededException * You have exceeded the number of events you can subscribe to. * @throws SubscriptionAlreadyExistException * This subscription already exists. * @throws SnsInvalidTopicException * The SNS topic is invalid. * @throws SnsNoAuthorizationException * There is no SNS authorization. * @throws SnsTopicArnNotFoundException * The ARN of the SNS topic could not be found. * @throws SubscriptionCategoryNotFoundException * The designated subscription category could not be found. * @throws SourceNotFoundException * The source could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.CreateEventSubscription * @see AWS API Documentation */ @Override public CreateEventSubscriptionResponse createEventSubscription(CreateEventSubscriptionRequest createEventSubscriptionRequest) throws EventSubscriptionQuotaExceededException, SubscriptionAlreadyExistException, SnsInvalidTopicException, SnsNoAuthorizationException, SnsTopicArnNotFoundException, SubscriptionCategoryNotFoundException, SourceNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateEventSubscriptionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateEventSubscription").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createEventSubscriptionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateEventSubscriptionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the CreateGlobalCluster operation returned by the service. * @throws GlobalClusterAlreadyExistsException * The GlobalClusterIdentifier already exists. Choose a new global database identifier (unique * name) to create a new global database cluster. * @throws GlobalClusterQuotaExceededException * The number of global database clusters for this account is already at the maximum allowed. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.CreateGlobalCluster * @see AWS * API Documentation */ @Override public CreateGlobalClusterResponse createGlobalCluster(CreateGlobalClusterRequest createGlobalClusterRequest) throws GlobalClusterAlreadyExistsException, GlobalClusterQuotaExceededException, InvalidDbClusterStateException, DbClusterNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateGlobalClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateGlobalCluster").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createGlobalClusterRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateGlobalClusterRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DeleteDBCluster operation returned by the service. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws DbClusterSnapshotAlreadyExistsException * User already has a DB cluster snapshot with the given identifier. * @throws SnapshotQuotaExceededException * Request would result in user exceeding the allowed number of DB snapshots. * @throws InvalidDbClusterSnapshotStateException * The supplied value is not a valid DB cluster snapshot state. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DeleteDBCluster * @see AWS API * Documentation */ @Override public DeleteDbClusterResponse deleteDBCluster(DeleteDbClusterRequest deleteDbClusterRequest) throws DbClusterNotFoundException, InvalidDbClusterStateException, DbClusterSnapshotAlreadyExistsException, SnapshotQuotaExceededException, InvalidDbClusterSnapshotStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteDbClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteDBCluster").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteDbClusterRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteDbClusterRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a custom endpoint and removes it from an Amazon Neptune DB cluster. *

* * @param deleteDbClusterEndpointRequest * @return Result of the DeleteDBClusterEndpoint operation returned by the service. * @throws InvalidDbClusterEndpointStateException * The requested operation cannot be performed on the endpoint while the endpoint is in this state. * @throws DbClusterEndpointNotFoundException * The specified custom endpoint doesn't exist. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DeleteDBClusterEndpoint * @see AWS API Documentation */ @Override public DeleteDbClusterEndpointResponse deleteDBClusterEndpoint(DeleteDbClusterEndpointRequest deleteDbClusterEndpointRequest) throws InvalidDbClusterEndpointStateException, DbClusterEndpointNotFoundException, InvalidDbClusterStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteDbClusterEndpointResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteDBClusterEndpoint").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteDbClusterEndpointRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteDbClusterEndpointRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DeleteDBClusterParameterGroup operation returned by the service. * @throws 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. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DeleteDBClusterParameterGroup * @see AWS API Documentation */ @Override public DeleteDbClusterParameterGroupResponse deleteDBClusterParameterGroup( DeleteDbClusterParameterGroupRequest deleteDbClusterParameterGroupRequest) throws InvalidDbParameterGroupStateException, DbParameterGroupNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteDbClusterParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteDBClusterParameterGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteDbClusterParameterGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteDbClusterParameterGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DeleteDBClusterSnapshot operation returned by the service. * @throws InvalidDbClusterSnapshotStateException * The supplied value is not a valid DB cluster snapshot state. * @throws DbClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DeleteDBClusterSnapshot * @see AWS API Documentation */ @Override public DeleteDbClusterSnapshotResponse deleteDBClusterSnapshot(DeleteDbClusterSnapshotRequest deleteDbClusterSnapshotRequest) throws InvalidDbClusterSnapshotStateException, DbClusterSnapshotNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteDbClusterSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteDBClusterSnapshot").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteDbClusterSnapshotRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteDbClusterSnapshotRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DeleteDBInstance operation returned by the service. * @throws DbInstanceNotFoundException * DBInstanceIdentifier does not refer to an existing DB instance. * @throws InvalidDbInstanceStateException * The specified DB instance is not in the available state. * @throws DbSnapshotAlreadyExistsException * DBSnapshotIdentifier is already used by an existing snapshot. * @throws SnapshotQuotaExceededException * Request would result in user exceeding the allowed number of DB snapshots. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DeleteDBInstance * @see AWS API * Documentation */ @Override public DeleteDbInstanceResponse deleteDBInstance(DeleteDbInstanceRequest deleteDbInstanceRequest) throws DbInstanceNotFoundException, InvalidDbInstanceStateException, DbSnapshotAlreadyExistsException, SnapshotQuotaExceededException, InvalidDbClusterStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteDbInstanceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteDBInstance").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteDbInstanceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteDbInstanceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a specified DBParameterGroup. The DBParameterGroup to be deleted can't be associated with any DB * instances. *

* * @param deleteDbParameterGroupRequest * @return Result of the DeleteDBParameterGroup operation returned by the service. * @throws 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. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DeleteDBParameterGroup * @see AWS API Documentation */ @Override public DeleteDbParameterGroupResponse deleteDBParameterGroup(DeleteDbParameterGroupRequest deleteDbParameterGroupRequest) throws InvalidDbParameterGroupStateException, DbParameterGroupNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteDbParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteDBParameterGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteDbParameterGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteDbParameterGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a DB subnet group. *

* *

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

*
* * @param deleteDbSubnetGroupRequest * @return Result of the DeleteDBSubnetGroup operation returned by the service. * @throws InvalidDbSubnetGroupStateException * The DB subnet group cannot be deleted because it is in use. * @throws InvalidDbSubnetStateException * The DB subnet is not in the available state. * @throws DbSubnetGroupNotFoundException * DBSubnetGroupName does not refer to an existing DB subnet group. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DeleteDBSubnetGroup * @see AWS * API Documentation */ @Override public DeleteDbSubnetGroupResponse deleteDBSubnetGroup(DeleteDbSubnetGroupRequest deleteDbSubnetGroupRequest) throws InvalidDbSubnetGroupStateException, InvalidDbSubnetStateException, DbSubnetGroupNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteDbSubnetGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteDBSubnetGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteDbSubnetGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteDbSubnetGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes an event notification subscription. *

* * @param deleteEventSubscriptionRequest * @return Result of the DeleteEventSubscription operation returned by the service. * @throws SubscriptionNotFoundException * The designated subscription could not be found. * @throws InvalidEventSubscriptionStateException * The event subscription is in an invalid state. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DeleteEventSubscription * @see AWS API Documentation */ @Override public DeleteEventSubscriptionResponse deleteEventSubscription(DeleteEventSubscriptionRequest deleteEventSubscriptionRequest) throws SubscriptionNotFoundException, InvalidEventSubscriptionStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteEventSubscriptionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteEventSubscription").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteEventSubscriptionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteEventSubscriptionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a global database. The primary and all secondary clusters must already be detached or deleted first. *

* * @param deleteGlobalClusterRequest * @return Result of the DeleteGlobalCluster operation returned by the service. * @throws GlobalClusterNotFoundException * The GlobalClusterIdentifier doesn't refer to an existing global database cluster. * @throws InvalidGlobalClusterStateException * The global cluster is in an invalid state and can't perform the requested operation. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DeleteGlobalCluster * @see AWS * API Documentation */ @Override public DeleteGlobalClusterResponse deleteGlobalCluster(DeleteGlobalClusterRequest deleteGlobalClusterRequest) throws GlobalClusterNotFoundException, InvalidGlobalClusterStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteGlobalClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteGlobalCluster").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteGlobalClusterRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteGlobalClusterRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DescribeDBClusterEndpoints operation returned by the service. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBClusterEndpoints * @see AWS API Documentation */ @Override public DescribeDbClusterEndpointsResponse describeDBClusterEndpoints( DescribeDbClusterEndpointsRequest describeDbClusterEndpointsRequest) throws DbClusterNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeDbClusterEndpointsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeDBClusterEndpoints").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeDbClusterEndpointsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeDbClusterEndpointsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about endpoints for an Amazon Neptune DB cluster. *

* *

* This operation can also return information for Amazon RDS clusters and Amazon DocDB clusters. *

*

*

* This is a variant of * {@link #describeDBClusterEndpoints(software.amazon.awssdk.services.neptune.model.DescribeDbClusterEndpointsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBClusterEndpointsIterable responses = client.describeDBClusterEndpointsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.neptune.paginators.DescribeDBClusterEndpointsIterable responses = client
     *             .describeDBClusterEndpointsPaginator(request);
     *     for (software.amazon.awssdk.services.neptune.model.DescribeDbClusterEndpointsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBClusterEndpointsIterable responses = client.describeDBClusterEndpointsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of MaxRecords won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #describeDBClusterEndpoints(software.amazon.awssdk.services.neptune.model.DescribeDbClusterEndpointsRequest)} * operation. *

* * @param describeDbClusterEndpointsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBClusterEndpoints * @see AWS API Documentation */ @Override public DescribeDBClusterEndpointsIterable describeDBClusterEndpointsPaginator( DescribeDbClusterEndpointsRequest describeDbClusterEndpointsRequest) throws DbClusterNotFoundException, AwsServiceException, SdkClientException, NeptuneException { return new DescribeDBClusterEndpointsIterable(this, applyPaginatorUserAgent(describeDbClusterEndpointsRequest)); } /** *

* 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 Result of the DescribeDBClusterParameterGroups operation returned by the service. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBClusterParameterGroups * @see AWS API Documentation */ @Override public DescribeDbClusterParameterGroupsResponse describeDBClusterParameterGroups( DescribeDbClusterParameterGroupsRequest describeDbClusterParameterGroupsRequest) throws DbParameterGroupNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeDbClusterParameterGroupsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeDBClusterParameterGroups").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeDbClusterParameterGroupsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeDbClusterParameterGroupsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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. *

*
*

* This is a variant of * {@link #describeDBClusterParameterGroups(software.amazon.awssdk.services.neptune.model.DescribeDbClusterParameterGroupsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBClusterParameterGroupsIterable responses = client.describeDBClusterParameterGroupsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.neptune.paginators.DescribeDBClusterParameterGroupsIterable responses = client
     *             .describeDBClusterParameterGroupsPaginator(request);
     *     for (software.amazon.awssdk.services.neptune.model.DescribeDbClusterParameterGroupsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBClusterParameterGroupsIterable responses = client.describeDBClusterParameterGroupsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of MaxRecords won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #describeDBClusterParameterGroups(software.amazon.awssdk.services.neptune.model.DescribeDbClusterParameterGroupsRequest)} * operation. *

* * @param describeDbClusterParameterGroupsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBClusterParameterGroups * @see AWS API Documentation */ @Override public DescribeDBClusterParameterGroupsIterable describeDBClusterParameterGroupsPaginator( DescribeDbClusterParameterGroupsRequest describeDbClusterParameterGroupsRequest) throws DbParameterGroupNotFoundException, AwsServiceException, SdkClientException, NeptuneException { return new DescribeDBClusterParameterGroupsIterable(this, applyPaginatorUserAgent(describeDbClusterParameterGroupsRequest)); } /** *

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

* * @param describeDbClusterParametersRequest * @return Result of the DescribeDBClusterParameters operation returned by the service. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBClusterParameters * @see AWS API Documentation */ @Override public DescribeDbClusterParametersResponse describeDBClusterParameters( DescribeDbClusterParametersRequest describeDbClusterParametersRequest) throws DbParameterGroupNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeDbClusterParametersResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeDBClusterParameters").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeDbClusterParametersRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeDbClusterParametersRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

*
*

* This is a variant of * {@link #describeDBClusterParameters(software.amazon.awssdk.services.neptune.model.DescribeDbClusterParametersRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBClusterParametersIterable responses = client.describeDBClusterParametersPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.neptune.paginators.DescribeDBClusterParametersIterable responses = client
     *             .describeDBClusterParametersPaginator(request);
     *     for (software.amazon.awssdk.services.neptune.model.DescribeDbClusterParametersResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBClusterParametersIterable responses = client.describeDBClusterParametersPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of MaxRecords won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #describeDBClusterParameters(software.amazon.awssdk.services.neptune.model.DescribeDbClusterParametersRequest)} * operation. *

* * @param describeDbClusterParametersRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBClusterParameters * @see AWS API Documentation */ @Override public DescribeDBClusterParametersIterable describeDBClusterParametersPaginator( DescribeDbClusterParametersRequest describeDbClusterParametersRequest) throws DbParameterGroupNotFoundException, AwsServiceException, SdkClientException, NeptuneException { return new DescribeDBClusterParametersIterable(this, applyPaginatorUserAgent(describeDbClusterParametersRequest)); } /** *

* 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 Result of the DescribeDBClusterSnapshotAttributes operation returned by the service. * @throws DbClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBClusterSnapshotAttributes * @see AWS API Documentation */ @Override public DescribeDbClusterSnapshotAttributesResponse describeDBClusterSnapshotAttributes( DescribeDbClusterSnapshotAttributesRequest describeDbClusterSnapshotAttributesRequest) throws DbClusterSnapshotNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeDbClusterSnapshotAttributesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeDBClusterSnapshotAttributes").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeDbClusterSnapshotAttributesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeDbClusterSnapshotAttributesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about DB cluster snapshots. This API action supports pagination. *

* * @param describeDbClusterSnapshotsRequest * @return Result of the DescribeDBClusterSnapshots operation returned by the service. * @throws DbClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBClusterSnapshots * @see AWS API Documentation */ @Override public DescribeDbClusterSnapshotsResponse describeDBClusterSnapshots( DescribeDbClusterSnapshotsRequest describeDbClusterSnapshotsRequest) throws DbClusterSnapshotNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeDbClusterSnapshotsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeDBClusterSnapshots").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeDbClusterSnapshotsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeDbClusterSnapshotsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about DB cluster snapshots. This API action supports pagination. *

*
*

* This is a variant of * {@link #describeDBClusterSnapshots(software.amazon.awssdk.services.neptune.model.DescribeDbClusterSnapshotsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBClusterSnapshotsIterable responses = client.describeDBClusterSnapshotsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.neptune.paginators.DescribeDBClusterSnapshotsIterable responses = client
     *             .describeDBClusterSnapshotsPaginator(request);
     *     for (software.amazon.awssdk.services.neptune.model.DescribeDbClusterSnapshotsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBClusterSnapshotsIterable responses = client.describeDBClusterSnapshotsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of MaxRecords won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #describeDBClusterSnapshots(software.amazon.awssdk.services.neptune.model.DescribeDbClusterSnapshotsRequest)} * operation. *

* * @param describeDbClusterSnapshotsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws DbClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBClusterSnapshots * @see AWS API Documentation */ @Override public DescribeDBClusterSnapshotsIterable describeDBClusterSnapshotsPaginator( DescribeDbClusterSnapshotsRequest describeDbClusterSnapshotsRequest) throws DbClusterSnapshotNotFoundException, AwsServiceException, SdkClientException, NeptuneException { return new DescribeDBClusterSnapshotsIterable(this, applyPaginatorUserAgent(describeDbClusterSnapshotsRequest)); } /** *

* 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 Result of the DescribeDBClusters operation returned by the service. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBClusters * @see AWS * API Documentation */ @Override public DescribeDbClustersResponse describeDBClusters(DescribeDbClustersRequest describeDbClustersRequest) throws DbClusterNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeDbClustersResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeDBClusters").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeDbClustersRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeDbClustersRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about provisioned DB clusters, and supports pagination. *

* *

* This operation can also return information for Amazon RDS clusters and Amazon DocDB clusters. *

*

*

* This is a variant of * {@link #describeDBClusters(software.amazon.awssdk.services.neptune.model.DescribeDbClustersRequest)} operation. * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally * handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBClustersIterable responses = client.describeDBClustersPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.neptune.paginators.DescribeDBClustersIterable responses = client
     *             .describeDBClustersPaginator(request);
     *     for (software.amazon.awssdk.services.neptune.model.DescribeDbClustersResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBClustersIterable responses = client.describeDBClustersPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of MaxRecords won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #describeDBClusters(software.amazon.awssdk.services.neptune.model.DescribeDbClustersRequest)} * operation. *

* * @param describeDbClustersRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBClusters * @see AWS * API Documentation */ @Override public DescribeDBClustersIterable describeDBClustersPaginator(DescribeDbClustersRequest describeDbClustersRequest) throws DbClusterNotFoundException, AwsServiceException, SdkClientException, NeptuneException { return new DescribeDBClustersIterable(this, applyPaginatorUserAgent(describeDbClustersRequest)); } /** *

* Returns a list of the available DB engines. *

* * @param describeDbEngineVersionsRequest * @return Result of the DescribeDBEngineVersions operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBEngineVersions * @see AWS API Documentation */ @Override public DescribeDbEngineVersionsResponse describeDBEngineVersions( DescribeDbEngineVersionsRequest describeDbEngineVersionsRequest) throws AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeDbEngineVersionsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeDBEngineVersions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeDbEngineVersionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeDbEngineVersionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of the available DB engines. *

*
*

* This is a variant of * {@link #describeDBEngineVersions(software.amazon.awssdk.services.neptune.model.DescribeDbEngineVersionsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBEngineVersionsIterable responses = client.describeDBEngineVersionsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.neptune.paginators.DescribeDBEngineVersionsIterable responses = client
     *             .describeDBEngineVersionsPaginator(request);
     *     for (software.amazon.awssdk.services.neptune.model.DescribeDbEngineVersionsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBEngineVersionsIterable responses = client.describeDBEngineVersionsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of MaxRecords won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #describeDBEngineVersions(software.amazon.awssdk.services.neptune.model.DescribeDbEngineVersionsRequest)} * operation. *

* * @param describeDbEngineVersionsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBEngineVersions * @see AWS API Documentation */ @Override public DescribeDBEngineVersionsIterable describeDBEngineVersionsPaginator( DescribeDbEngineVersionsRequest describeDbEngineVersionsRequest) throws AwsServiceException, SdkClientException, NeptuneException { return new DescribeDBEngineVersionsIterable(this, applyPaginatorUserAgent(describeDbEngineVersionsRequest)); } /** *

* 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 Result of the DescribeDBInstances operation returned by the service. * @throws DbInstanceNotFoundException * DBInstanceIdentifier does not refer to an existing DB instance. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBInstances * @see AWS * API Documentation */ @Override public DescribeDbInstancesResponse describeDBInstances(DescribeDbInstancesRequest describeDbInstancesRequest) throws DbInstanceNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeDbInstancesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeDBInstances").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeDbInstancesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeDbInstancesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about provisioned instances, and supports pagination. *

* *

* This operation can also return information for Amazon RDS instances and Amazon DocDB instances. *

*

*

* This is a variant of * {@link #describeDBInstances(software.amazon.awssdk.services.neptune.model.DescribeDbInstancesRequest)} operation. * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally * handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBInstancesIterable responses = client.describeDBInstancesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.neptune.paginators.DescribeDBInstancesIterable responses = client
     *             .describeDBInstancesPaginator(request);
     *     for (software.amazon.awssdk.services.neptune.model.DescribeDbInstancesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBInstancesIterable responses = client.describeDBInstancesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of MaxRecords won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #describeDBInstances(software.amazon.awssdk.services.neptune.model.DescribeDbInstancesRequest)} * operation. *

* * @param describeDbInstancesRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws DbInstanceNotFoundException * DBInstanceIdentifier does not refer to an existing DB instance. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBInstances * @see AWS * API Documentation */ @Override public DescribeDBInstancesIterable describeDBInstancesPaginator(DescribeDbInstancesRequest describeDbInstancesRequest) throws DbInstanceNotFoundException, AwsServiceException, SdkClientException, NeptuneException { return new DescribeDBInstancesIterable(this, applyPaginatorUserAgent(describeDbInstancesRequest)); } /** *

* 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 Result of the DescribeDBParameterGroups operation returned by the service. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBParameterGroups * @see AWS API Documentation */ @Override public DescribeDbParameterGroupsResponse describeDBParameterGroups( DescribeDbParameterGroupsRequest describeDbParameterGroupsRequest) throws DbParameterGroupNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeDbParameterGroupsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeDBParameterGroups").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeDbParameterGroupsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeDbParameterGroupsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of DBParameterGroup descriptions. If a DBParameterGroupName is * specified, the list will contain only the description of the specified DB parameter group. *

*
*

* This is a variant of * {@link #describeDBParameterGroups(software.amazon.awssdk.services.neptune.model.DescribeDbParameterGroupsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBParameterGroupsIterable responses = client.describeDBParameterGroupsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.neptune.paginators.DescribeDBParameterGroupsIterable responses = client
     *             .describeDBParameterGroupsPaginator(request);
     *     for (software.amazon.awssdk.services.neptune.model.DescribeDbParameterGroupsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBParameterGroupsIterable responses = client.describeDBParameterGroupsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of MaxRecords won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #describeDBParameterGroups(software.amazon.awssdk.services.neptune.model.DescribeDbParameterGroupsRequest)} * operation. *

* * @param describeDbParameterGroupsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBParameterGroups * @see AWS API Documentation */ @Override public DescribeDBParameterGroupsIterable describeDBParameterGroupsPaginator( DescribeDbParameterGroupsRequest describeDbParameterGroupsRequest) throws DbParameterGroupNotFoundException, AwsServiceException, SdkClientException, NeptuneException { return new DescribeDBParameterGroupsIterable(this, applyPaginatorUserAgent(describeDbParameterGroupsRequest)); } /** *

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

* * @param describeDbParametersRequest * @return Result of the DescribeDBParameters operation returned by the service. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBParameters * @see AWS * API Documentation */ @Override public DescribeDbParametersResponse describeDBParameters(DescribeDbParametersRequest describeDbParametersRequest) throws DbParameterGroupNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeDbParametersResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeDBParameters").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeDbParametersRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeDbParametersRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

*
*

* This is a variant of * {@link #describeDBParameters(software.amazon.awssdk.services.neptune.model.DescribeDbParametersRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBParametersIterable responses = client.describeDBParametersPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.neptune.paginators.DescribeDBParametersIterable responses = client
     *             .describeDBParametersPaginator(request);
     *     for (software.amazon.awssdk.services.neptune.model.DescribeDbParametersResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBParametersIterable responses = client.describeDBParametersPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of MaxRecords won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #describeDBParameters(software.amazon.awssdk.services.neptune.model.DescribeDbParametersRequest)} * operation. *

* * @param describeDbParametersRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBParameters * @see AWS * API Documentation */ @Override public DescribeDBParametersIterable describeDBParametersPaginator(DescribeDbParametersRequest describeDbParametersRequest) throws DbParameterGroupNotFoundException, AwsServiceException, SdkClientException, NeptuneException { return new DescribeDBParametersIterable(this, applyPaginatorUserAgent(describeDbParametersRequest)); } /** *

* 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 Result of the DescribeDBSubnetGroups operation returned by the service. * @throws DbSubnetGroupNotFoundException * DBSubnetGroupName does not refer to an existing DB subnet group. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBSubnetGroups * @see AWS API Documentation */ @Override public DescribeDbSubnetGroupsResponse describeDBSubnetGroups(DescribeDbSubnetGroupsRequest describeDbSubnetGroupsRequest) throws DbSubnetGroupNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeDbSubnetGroupsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeDBSubnetGroups").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeDbSubnetGroupsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeDbSubnetGroupsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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. *

*
*

* This is a variant of * {@link #describeDBSubnetGroups(software.amazon.awssdk.services.neptune.model.DescribeDbSubnetGroupsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBSubnetGroupsIterable responses = client.describeDBSubnetGroupsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.neptune.paginators.DescribeDBSubnetGroupsIterable responses = client
     *             .describeDBSubnetGroupsPaginator(request);
     *     for (software.amazon.awssdk.services.neptune.model.DescribeDbSubnetGroupsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeDBSubnetGroupsIterable responses = client.describeDBSubnetGroupsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of MaxRecords won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #describeDBSubnetGroups(software.amazon.awssdk.services.neptune.model.DescribeDbSubnetGroupsRequest)} * operation. *

* * @param describeDbSubnetGroupsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws DbSubnetGroupNotFoundException * DBSubnetGroupName does not refer to an existing DB subnet group. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeDBSubnetGroups * @see AWS API Documentation */ @Override public DescribeDBSubnetGroupsIterable describeDBSubnetGroupsPaginator( DescribeDbSubnetGroupsRequest describeDbSubnetGroupsRequest) throws DbSubnetGroupNotFoundException, AwsServiceException, SdkClientException, NeptuneException { return new DescribeDBSubnetGroupsIterable(this, applyPaginatorUserAgent(describeDbSubnetGroupsRequest)); } /** *

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

* * @param describeEngineDefaultClusterParametersRequest * @return Result of the DescribeEngineDefaultClusterParameters operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeEngineDefaultClusterParameters * @see AWS API Documentation */ @Override public DescribeEngineDefaultClusterParametersResponse describeEngineDefaultClusterParameters( DescribeEngineDefaultClusterParametersRequest describeEngineDefaultClusterParametersRequest) throws AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeEngineDefaultClusterParametersResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEngineDefaultClusterParameters").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler) .withInput(describeEngineDefaultClusterParametersRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeEngineDefaultClusterParametersRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param describeEngineDefaultParametersRequest * @return Result of the DescribeEngineDefaultParameters operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeEngineDefaultParameters * @see AWS API Documentation */ @Override public DescribeEngineDefaultParametersResponse describeEngineDefaultParameters( DescribeEngineDefaultParametersRequest describeEngineDefaultParametersRequest) throws AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeEngineDefaultParametersResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEngineDefaultParameters").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeEngineDefaultParametersRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeEngineDefaultParametersRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

*
*

* This is a variant of * {@link #describeEngineDefaultParameters(software.amazon.awssdk.services.neptune.model.DescribeEngineDefaultParametersRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeEngineDefaultParametersIterable responses = client.describeEngineDefaultParametersPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.neptune.paginators.DescribeEngineDefaultParametersIterable responses = client
     *             .describeEngineDefaultParametersPaginator(request);
     *     for (software.amazon.awssdk.services.neptune.model.DescribeEngineDefaultParametersResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeEngineDefaultParametersIterable responses = client.describeEngineDefaultParametersPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of MaxRecords won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #describeEngineDefaultParameters(software.amazon.awssdk.services.neptune.model.DescribeEngineDefaultParametersRequest)} * operation. *

* * @param describeEngineDefaultParametersRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeEngineDefaultParameters * @see AWS API Documentation */ @Override public DescribeEngineDefaultParametersIterable describeEngineDefaultParametersPaginator( DescribeEngineDefaultParametersRequest describeEngineDefaultParametersRequest) throws AwsServiceException, SdkClientException, NeptuneException { return new DescribeEngineDefaultParametersIterable(this, applyPaginatorUserAgent(describeEngineDefaultParametersRequest)); } /** *

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

* * @param describeEventCategoriesRequest * @return Result of the DescribeEventCategories operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeEventCategories * @see AWS API Documentation */ @Override public DescribeEventCategoriesResponse describeEventCategories(DescribeEventCategoriesRequest describeEventCategoriesRequest) throws AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeEventCategoriesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEventCategories").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeEventCategoriesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeEventCategoriesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the DescribeEventSubscriptions operation returned by the service. * @throws SubscriptionNotFoundException * The designated subscription could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeEventSubscriptions * @see AWS API Documentation */ @Override public DescribeEventSubscriptionsResponse describeEventSubscriptions( DescribeEventSubscriptionsRequest describeEventSubscriptionsRequest) throws SubscriptionNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeEventSubscriptionsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEventSubscriptions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeEventSubscriptionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeEventSubscriptionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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. *

*
*

* This is a variant of * {@link #describeEventSubscriptions(software.amazon.awssdk.services.neptune.model.DescribeEventSubscriptionsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeEventSubscriptionsIterable responses = client.describeEventSubscriptionsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.neptune.paginators.DescribeEventSubscriptionsIterable responses = client
     *             .describeEventSubscriptionsPaginator(request);
     *     for (software.amazon.awssdk.services.neptune.model.DescribeEventSubscriptionsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeEventSubscriptionsIterable responses = client.describeEventSubscriptionsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of MaxRecords won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #describeEventSubscriptions(software.amazon.awssdk.services.neptune.model.DescribeEventSubscriptionsRequest)} * operation. *

* * @param describeEventSubscriptionsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws SubscriptionNotFoundException * The designated subscription could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeEventSubscriptions * @see AWS API Documentation */ @Override public DescribeEventSubscriptionsIterable describeEventSubscriptionsPaginator( DescribeEventSubscriptionsRequest describeEventSubscriptionsRequest) throws SubscriptionNotFoundException, AwsServiceException, SdkClientException, NeptuneException { return new DescribeEventSubscriptionsIterable(this, applyPaginatorUserAgent(describeEventSubscriptionsRequest)); } /** *

* 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 Result of the DescribeEvents operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeEvents * @see AWS API * Documentation */ @Override public DescribeEventsResponse describeEvents(DescribeEventsRequest describeEventsRequest) throws AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeEventsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DescribeEvents").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeEventsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeEventsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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. *

*
*

* This is a variant of {@link #describeEvents(software.amazon.awssdk.services.neptune.model.DescribeEventsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeEventsIterable responses = client.describeEventsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.neptune.paginators.DescribeEventsIterable responses = client.describeEventsPaginator(request);
     *     for (software.amazon.awssdk.services.neptune.model.DescribeEventsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeEventsIterable responses = client.describeEventsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of MaxRecords won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #describeEvents(software.amazon.awssdk.services.neptune.model.DescribeEventsRequest)} operation. *

* * @param describeEventsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeEvents * @see AWS API * Documentation */ @Override public DescribeEventsIterable describeEventsPaginator(DescribeEventsRequest describeEventsRequest) throws AwsServiceException, SdkClientException, NeptuneException { return new DescribeEventsIterable(this, applyPaginatorUserAgent(describeEventsRequest)); } /** *

* Returns information about Neptune global database clusters. This API supports pagination. *

* * @param describeGlobalClustersRequest * @return Result of the DescribeGlobalClusters operation returned by the service. * @throws GlobalClusterNotFoundException * The GlobalClusterIdentifier doesn't refer to an existing global database cluster. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeGlobalClusters * @see AWS API Documentation */ @Override public DescribeGlobalClustersResponse describeGlobalClusters(DescribeGlobalClustersRequest describeGlobalClustersRequest) throws GlobalClusterNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeGlobalClustersResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeGlobalClusters").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeGlobalClustersRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeGlobalClustersRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param describeOrderableDbInstanceOptionsRequest * @return Result of the DescribeOrderableDBInstanceOptions operation returned by the service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeOrderableDBInstanceOptions * @see AWS API Documentation */ @Override public DescribeOrderableDbInstanceOptionsResponse describeOrderableDBInstanceOptions( DescribeOrderableDbInstanceOptionsRequest describeOrderableDbInstanceOptionsRequest) throws AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeOrderableDbInstanceOptionsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeOrderableDBInstanceOptions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describeOrderableDbInstanceOptionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeOrderableDbInstanceOptionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

*
*

* This is a variant of * {@link #describeOrderableDBInstanceOptions(software.amazon.awssdk.services.neptune.model.DescribeOrderableDbInstanceOptionsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeOrderableDBInstanceOptionsIterable responses = client.describeOrderableDBInstanceOptionsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.neptune.paginators.DescribeOrderableDBInstanceOptionsIterable responses = client
     *             .describeOrderableDBInstanceOptionsPaginator(request);
     *     for (software.amazon.awssdk.services.neptune.model.DescribeOrderableDbInstanceOptionsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribeOrderableDBInstanceOptionsIterable responses = client.describeOrderableDBInstanceOptionsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of MaxRecords won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #describeOrderableDBInstanceOptions(software.amazon.awssdk.services.neptune.model.DescribeOrderableDbInstanceOptionsRequest)} * operation. *

* * @param describeOrderableDbInstanceOptionsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeOrderableDBInstanceOptions * @see AWS API Documentation */ @Override public DescribeOrderableDBInstanceOptionsIterable describeOrderableDBInstanceOptionsPaginator( DescribeOrderableDbInstanceOptionsRequest describeOrderableDbInstanceOptionsRequest) throws AwsServiceException, SdkClientException, NeptuneException { return new DescribeOrderableDBInstanceOptionsIterable(this, applyPaginatorUserAgent(describeOrderableDbInstanceOptionsRequest)); } /** *

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

* * @param describePendingMaintenanceActionsRequest * @return Result of the DescribePendingMaintenanceActions operation returned by the service. * @throws ResourceNotFoundException * The specified resource ID was not found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribePendingMaintenanceActions * @see AWS API Documentation */ @Override public DescribePendingMaintenanceActionsResponse describePendingMaintenanceActions( DescribePendingMaintenanceActionsRequest describePendingMaintenanceActionsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribePendingMaintenanceActionsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribePendingMaintenanceActions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(describePendingMaintenanceActionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribePendingMaintenanceActionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

*
*

* This is a variant of * {@link #describePendingMaintenanceActions(software.amazon.awssdk.services.neptune.model.DescribePendingMaintenanceActionsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribePendingMaintenanceActionsIterable responses = client.describePendingMaintenanceActionsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.neptune.paginators.DescribePendingMaintenanceActionsIterable responses = client
     *             .describePendingMaintenanceActionsPaginator(request);
     *     for (software.amazon.awssdk.services.neptune.model.DescribePendingMaintenanceActionsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.neptune.paginators.DescribePendingMaintenanceActionsIterable responses = client.describePendingMaintenanceActionsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of MaxRecords won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #describePendingMaintenanceActions(software.amazon.awssdk.services.neptune.model.DescribePendingMaintenanceActionsRequest)} * operation. *

* * @param describePendingMaintenanceActionsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws ResourceNotFoundException * The specified resource ID was not found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribePendingMaintenanceActions * @see AWS API Documentation */ @Override public DescribePendingMaintenanceActionsIterable describePendingMaintenanceActionsPaginator( DescribePendingMaintenanceActionsRequest describePendingMaintenanceActionsRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, NeptuneException { return new DescribePendingMaintenanceActionsIterable(this, applyPaginatorUserAgent(describePendingMaintenanceActionsRequest)); } /** *

* 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 Result of the DescribeValidDBInstanceModifications operation returned by the service. * @throws DbInstanceNotFoundException * DBInstanceIdentifier does not refer to an existing DB instance. * @throws InvalidDbInstanceStateException * The specified DB instance is not in the available state. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.DescribeValidDBInstanceModifications * @see AWS API Documentation */ @Override public DescribeValidDbInstanceModificationsResponse describeValidDBInstanceModifications( DescribeValidDbInstanceModificationsRequest describeValidDbInstanceModificationsRequest) throws DbInstanceNotFoundException, InvalidDbInstanceStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeValidDbInstanceModificationsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeValidDBInstanceModifications").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler) .withInput(describeValidDbInstanceModificationsRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new DescribeValidDbInstanceModificationsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the FailoverDBCluster operation returned by the service. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws InvalidDbInstanceStateException * The specified DB instance is not in the available state. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.FailoverDBCluster * @see AWS API * Documentation */ @Override public FailoverDbClusterResponse failoverDBCluster(FailoverDbClusterRequest failoverDbClusterRequest) throws DbClusterNotFoundException, InvalidDbClusterStateException, InvalidDbInstanceStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(FailoverDbClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("FailoverDBCluster").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(failoverDbClusterRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new FailoverDbClusterRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the FailoverGlobalCluster operation returned by the service. * @throws GlobalClusterNotFoundException * The GlobalClusterIdentifier doesn't refer to an existing global database cluster. * @throws InvalidGlobalClusterStateException * The global cluster is in an invalid state and can't perform the requested operation. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.FailoverGlobalCluster * @see AWS * API Documentation */ @Override public FailoverGlobalClusterResponse failoverGlobalCluster(FailoverGlobalClusterRequest failoverGlobalClusterRequest) throws GlobalClusterNotFoundException, InvalidGlobalClusterStateException, InvalidDbClusterStateException, DbClusterNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(FailoverGlobalClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("FailoverGlobalCluster").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(failoverGlobalClusterRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new FailoverGlobalClusterRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists all tags on an Amazon Neptune resource. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws DbInstanceNotFoundException * DBInstanceIdentifier does not refer to an existing DB instance. * @throws DbSnapshotNotFoundException * DBSnapshotIdentifier does not refer to an existing DB snapshot. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.ListTagsForResource * @see AWS * API Documentation */ @Override public ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws DbInstanceNotFoundException, DbSnapshotNotFoundException, DbClusterNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListTagsForResourceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListTagsForResource").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listTagsForResourceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the ModifyDBCluster operation returned by the service. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws StorageQuotaExceededException * Request would result in user exceeding the allowed amount of storage available across all DB instances. * @throws DbSubnetGroupNotFoundException * DBSubnetGroupName does not refer to an existing DB subnet group. * @throws InvalidVpcNetworkStateException * DB subnet group does not cover all Availability Zones after it is created because users' change. * @throws InvalidDbSubnetGroupStateException * The DB subnet group cannot be deleted because it is in use. * @throws InvalidSubnetException * The requested subnet is invalid, or multiple subnets were requested that are not all in a common VPC. * @throws DbClusterParameterGroupNotFoundException * DBClusterParameterGroupName does not refer to an existing DB Cluster parameter group. * @throws InvalidDbSecurityGroupStateException * The state of the DB security group does not allow deletion. * @throws InvalidDbInstanceStateException * The specified DB instance is not in the available state. * @throws DbClusterAlreadyExistsException * User already has a DB cluster with the given identifier. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.ModifyDBCluster * @see AWS API * Documentation */ @Override public ModifyDbClusterResponse modifyDBCluster(ModifyDbClusterRequest modifyDbClusterRequest) throws DbClusterNotFoundException, InvalidDbClusterStateException, StorageQuotaExceededException, DbSubnetGroupNotFoundException, InvalidVpcNetworkStateException, InvalidDbSubnetGroupStateException, InvalidSubnetException, DbClusterParameterGroupNotFoundException, InvalidDbSecurityGroupStateException, InvalidDbInstanceStateException, DbClusterAlreadyExistsException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyDbClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ModifyDBCluster").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(modifyDbClusterRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyDbClusterRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param modifyDbClusterEndpointRequest * @return Result of the ModifyDBClusterEndpoint operation returned by the service. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws InvalidDbClusterEndpointStateException * The requested operation cannot be performed on the endpoint while the endpoint is in this state. * @throws DbClusterEndpointNotFoundException * The specified custom endpoint doesn't exist. * @throws DbInstanceNotFoundException * DBInstanceIdentifier does not refer to an existing DB instance. * @throws InvalidDbInstanceStateException * The specified DB instance is not in the available state. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.ModifyDBClusterEndpoint * @see AWS API Documentation */ @Override public ModifyDbClusterEndpointResponse modifyDBClusterEndpoint(ModifyDbClusterEndpointRequest modifyDbClusterEndpointRequest) throws InvalidDbClusterStateException, InvalidDbClusterEndpointStateException, DbClusterEndpointNotFoundException, DbInstanceNotFoundException, InvalidDbInstanceStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyDbClusterEndpointResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyDBClusterEndpoint").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(modifyDbClusterEndpointRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyDbClusterEndpointRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the ModifyDBClusterParameterGroup operation returned by the service. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws 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. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.ModifyDBClusterParameterGroup * @see AWS API Documentation */ @Override public ModifyDbClusterParameterGroupResponse modifyDBClusterParameterGroup( ModifyDbClusterParameterGroupRequest modifyDbClusterParameterGroupRequest) throws DbParameterGroupNotFoundException, InvalidDbParameterGroupStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyDbClusterParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyDBClusterParameterGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(modifyDbClusterParameterGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyDbClusterParameterGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the ModifyDBClusterSnapshotAttribute operation returned by the service. * @throws DbClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. * @throws InvalidDbClusterSnapshotStateException * The supplied value is not a valid DB cluster snapshot state. * @throws SharedSnapshotQuotaExceededException * You have exceeded the maximum number of accounts that you can share a manual DB snapshot with. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.ModifyDBClusterSnapshotAttribute * @see AWS API Documentation */ @Override public ModifyDbClusterSnapshotAttributeResponse modifyDBClusterSnapshotAttribute( ModifyDbClusterSnapshotAttributeRequest modifyDbClusterSnapshotAttributeRequest) throws DbClusterSnapshotNotFoundException, InvalidDbClusterSnapshotStateException, SharedSnapshotQuotaExceededException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyDbClusterSnapshotAttributeResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyDBClusterSnapshotAttribute").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(modifyDbClusterSnapshotAttributeRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyDbClusterSnapshotAttributeRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the ModifyDBInstance operation returned by the service. * @throws InvalidDbInstanceStateException * The specified DB instance is not in the available state. * @throws InvalidDbSecurityGroupStateException * The state of the DB security group does not allow deletion. * @throws DbInstanceAlreadyExistsException * User already has a DB instance with the given identifier. * @throws DbInstanceNotFoundException * DBInstanceIdentifier does not refer to an existing DB instance. * @throws DbSecurityGroupNotFoundException * DBSecurityGroupName does not refer to an existing DB security group. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws InsufficientDbInstanceCapacityException * Specified DB instance class is not available in the specified Availability Zone. * @throws StorageQuotaExceededException * Request would result in user exceeding the allowed amount of storage available across all DB instances. * @throws InvalidVpcNetworkStateException * DB subnet group does not cover all Availability Zones after it is created because users' change. * @throws ProvisionedIopsNotAvailableInAzException * Provisioned IOPS not available in the specified Availability Zone. * @throws OptionGroupNotFoundException * The designated option group could not be found. * @throws DbUpgradeDependencyFailureException * The DB upgrade failed because a resource the DB depends on could not be modified. * @throws StorageTypeNotSupportedException * StorageType specified cannot be associated with the DB Instance. * @throws 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. * @throws CertificateNotFoundException * CertificateIdentifier does not refer to an existing certificate. * @throws DomainNotFoundException * Domain does not refer to an existing Active Directory Domain. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.ModifyDBInstance * @see AWS API * Documentation */ @Override public ModifyDbInstanceResponse modifyDBInstance(ModifyDbInstanceRequest modifyDbInstanceRequest) throws InvalidDbInstanceStateException, InvalidDbSecurityGroupStateException, DbInstanceAlreadyExistsException, DbInstanceNotFoundException, DbSecurityGroupNotFoundException, DbParameterGroupNotFoundException, InsufficientDbInstanceCapacityException, StorageQuotaExceededException, InvalidVpcNetworkStateException, ProvisionedIopsNotAvailableInAzException, OptionGroupNotFoundException, DbUpgradeDependencyFailureException, StorageTypeNotSupportedException, AuthorizationNotFoundException, CertificateNotFoundException, DomainNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyDbInstanceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ModifyDBInstance").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(modifyDbInstanceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyDbInstanceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the ModifyDBParameterGroup operation returned by the service. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws 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. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.ModifyDBParameterGroup * @see AWS API Documentation */ @Override public ModifyDbParameterGroupResponse modifyDBParameterGroup(ModifyDbParameterGroupRequest modifyDbParameterGroupRequest) throws DbParameterGroupNotFoundException, InvalidDbParameterGroupStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyDbParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyDBParameterGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(modifyDbParameterGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyDbParameterGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the ModifyDBSubnetGroup operation returned by the service. * @throws DbSubnetGroupNotFoundException * DBSubnetGroupName does not refer to an existing DB subnet group. * @throws DbSubnetQuotaExceededException * Request would result in user exceeding the allowed number of subnets in a DB subnet groups. * @throws SubnetAlreadyInUseException * The DB subnet is already in use in the Availability Zone. * @throws DbSubnetGroupDoesNotCoverEnoughAZsException * Subnets in the DB subnet group should cover at least two Availability Zones unless there is only one * Availability Zone. * @throws InvalidSubnetException * The requested subnet is invalid, or multiple subnets were requested that are not all in a common VPC. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.ModifyDBSubnetGroup * @see AWS * API Documentation */ @Override public ModifyDbSubnetGroupResponse modifyDBSubnetGroup(ModifyDbSubnetGroupRequest modifyDbSubnetGroupRequest) throws DbSubnetGroupNotFoundException, DbSubnetQuotaExceededException, SubnetAlreadyInUseException, DbSubnetGroupDoesNotCoverEnoughAZsException, InvalidSubnetException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyDbSubnetGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ModifyDBSubnetGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(modifyDbSubnetGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyDbSubnetGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the ModifyEventSubscription operation returned by the service. * @throws EventSubscriptionQuotaExceededException * You have exceeded the number of events you can subscribe to. * @throws SubscriptionNotFoundException * The designated subscription could not be found. * @throws SnsInvalidTopicException * The SNS topic is invalid. * @throws SnsNoAuthorizationException * There is no SNS authorization. * @throws SnsTopicArnNotFoundException * The ARN of the SNS topic could not be found. * @throws SubscriptionCategoryNotFoundException * The designated subscription category could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.ModifyEventSubscription * @see AWS API Documentation */ @Override public ModifyEventSubscriptionResponse modifyEventSubscription(ModifyEventSubscriptionRequest modifyEventSubscriptionRequest) throws EventSubscriptionQuotaExceededException, SubscriptionNotFoundException, SnsInvalidTopicException, SnsNoAuthorizationException, SnsTopicArnNotFoundException, SubscriptionCategoryNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyEventSubscriptionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyEventSubscription").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(modifyEventSubscriptionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyEventSubscriptionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the ModifyGlobalCluster operation returned by the service. * @throws GlobalClusterNotFoundException * The GlobalClusterIdentifier doesn't refer to an existing global database cluster. * @throws InvalidGlobalClusterStateException * The global cluster is in an invalid state and can't perform the requested operation. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.ModifyGlobalCluster * @see AWS * API Documentation */ @Override public ModifyGlobalClusterResponse modifyGlobalCluster(ModifyGlobalClusterRequest modifyGlobalClusterRequest) throws GlobalClusterNotFoundException, InvalidGlobalClusterStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyGlobalClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ModifyGlobalCluster").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(modifyGlobalClusterRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ModifyGlobalClusterRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Not supported. *

* * @param promoteReadReplicaDbClusterRequest * @return Result of the PromoteReadReplicaDBCluster operation returned by the service. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.PromoteReadReplicaDBCluster * @see AWS API Documentation */ @Override public PromoteReadReplicaDbClusterResponse promoteReadReplicaDBCluster( PromoteReadReplicaDbClusterRequest promoteReadReplicaDbClusterRequest) throws DbClusterNotFoundException, InvalidDbClusterStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(PromoteReadReplicaDbClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("PromoteReadReplicaDBCluster").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(promoteReadReplicaDbClusterRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new PromoteReadReplicaDbClusterRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the RebootDBInstance operation returned by the service. * @throws InvalidDbInstanceStateException * The specified DB instance is not in the available state. * @throws DbInstanceNotFoundException * DBInstanceIdentifier does not refer to an existing DB instance. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.RebootDBInstance * @see AWS API * Documentation */ @Override public RebootDbInstanceResponse rebootDBInstance(RebootDbInstanceRequest rebootDbInstanceRequest) throws InvalidDbInstanceStateException, DbInstanceNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RebootDbInstanceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("RebootDBInstance").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(rebootDbInstanceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RebootDbInstanceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the RemoveFromGlobalCluster operation returned by the service. * @throws GlobalClusterNotFoundException * The GlobalClusterIdentifier doesn't refer to an existing global database cluster. * @throws InvalidGlobalClusterStateException * The global cluster is in an invalid state and can't perform the requested operation. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.RemoveFromGlobalCluster * @see AWS API Documentation */ @Override public RemoveFromGlobalClusterResponse removeFromGlobalCluster(RemoveFromGlobalClusterRequest removeFromGlobalClusterRequest) throws GlobalClusterNotFoundException, InvalidGlobalClusterStateException, DbClusterNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RemoveFromGlobalClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("RemoveFromGlobalCluster").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(removeFromGlobalClusterRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RemoveFromGlobalClusterRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param removeRoleFromDbClusterRequest * @return Result of the RemoveRoleFromDBCluster operation returned by the service. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws DbClusterRoleNotFoundException * The specified IAM role Amazon Resource Name (ARN) is not associated with the specified DB cluster. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.RemoveRoleFromDBCluster * @see AWS API Documentation */ @Override public RemoveRoleFromDbClusterResponse removeRoleFromDBCluster(RemoveRoleFromDbClusterRequest removeRoleFromDbClusterRequest) throws DbClusterNotFoundException, DbClusterRoleNotFoundException, InvalidDbClusterStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RemoveRoleFromDbClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("RemoveRoleFromDBCluster").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(removeRoleFromDbClusterRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RemoveRoleFromDbClusterRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param removeSourceIdentifierFromSubscriptionRequest * @return Result of the RemoveSourceIdentifierFromSubscription operation returned by the service. * @throws SubscriptionNotFoundException * The designated subscription could not be found. * @throws SourceNotFoundException * The source could not be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.RemoveSourceIdentifierFromSubscription * @see AWS API Documentation */ @Override public RemoveSourceIdentifierFromSubscriptionResponse removeSourceIdentifierFromSubscription( RemoveSourceIdentifierFromSubscriptionRequest removeSourceIdentifierFromSubscriptionRequest) throws SubscriptionNotFoundException, SourceNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RemoveSourceIdentifierFromSubscriptionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("RemoveSourceIdentifierFromSubscription").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler) .withInput(removeSourceIdentifierFromSubscriptionRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new RemoveSourceIdentifierFromSubscriptionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Removes metadata tags from an Amazon Neptune resource. *

* * @param removeTagsFromResourceRequest * @return Result of the RemoveTagsFromResource operation returned by the service. * @throws DbInstanceNotFoundException * DBInstanceIdentifier does not refer to an existing DB instance. * @throws DbSnapshotNotFoundException * DBSnapshotIdentifier does not refer to an existing DB snapshot. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.RemoveTagsFromResource * @see AWS API Documentation */ @Override public RemoveTagsFromResourceResponse removeTagsFromResource(RemoveTagsFromResourceRequest removeTagsFromResourceRequest) throws DbInstanceNotFoundException, DbSnapshotNotFoundException, DbClusterNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RemoveTagsFromResourceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("RemoveTagsFromResource").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(removeTagsFromResourceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RemoveTagsFromResourceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the ResetDBClusterParameterGroup operation returned by the service. * @throws 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. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.ResetDBClusterParameterGroup * @see AWS API Documentation */ @Override public ResetDbClusterParameterGroupResponse resetDBClusterParameterGroup( ResetDbClusterParameterGroupRequest resetDbClusterParameterGroupRequest) throws InvalidDbParameterGroupStateException, DbParameterGroupNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ResetDbClusterParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ResetDBClusterParameterGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(resetDbClusterParameterGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ResetDbClusterParameterGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the ResetDBParameterGroup operation returned by the service. * @throws 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. * @throws DbParameterGroupNotFoundException * DBParameterGroupName does not refer to an existing DB parameter group. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.ResetDBParameterGroup * @see AWS * API Documentation */ @Override public ResetDbParameterGroupResponse resetDBParameterGroup(ResetDbParameterGroupRequest resetDbParameterGroupRequest) throws InvalidDbParameterGroupStateException, DbParameterGroupNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ResetDbParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ResetDBParameterGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(resetDbParameterGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ResetDbParameterGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the RestoreDBClusterFromSnapshot operation returned by the service. * @throws DbClusterAlreadyExistsException * User already has a DB cluster with the given identifier. * @throws DbClusterQuotaExceededException * User attempted to create a new DB cluster and the user has already reached the maximum allowed DB cluster * quota. * @throws StorageQuotaExceededException * Request would result in user exceeding the allowed amount of storage available across all DB instances. * @throws DbSubnetGroupNotFoundException * DBSubnetGroupName does not refer to an existing DB subnet group. * @throws DbSnapshotNotFoundException * DBSnapshotIdentifier does not refer to an existing DB snapshot. * @throws DbClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. * @throws InsufficientDbClusterCapacityException * The DB cluster does not have enough capacity for the current operation. * @throws 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. * @throws InvalidDbSnapshotStateException * The state of the DB snapshot does not allow deletion. * @throws InvalidDbClusterSnapshotStateException * The supplied value is not a valid DB cluster snapshot state. * @throws StorageQuotaExceededException * Request would result in user exceeding the allowed amount of storage available across all DB instances. * @throws InvalidVpcNetworkStateException * DB subnet group does not cover all Availability Zones after it is created because users' change. * @throws InvalidRestoreException * Cannot restore from vpc backup to non-vpc DB instance. * @throws DbSubnetGroupNotFoundException * DBSubnetGroupName does not refer to an existing DB subnet group. * @throws InvalidSubnetException * The requested subnet is invalid, or multiple subnets were requested that are not all in a common VPC. * @throws OptionGroupNotFoundException * The designated option group could not be found. * @throws KmsKeyNotAccessibleException * Error accessing KMS key. * @throws DbClusterParameterGroupNotFoundException * DBClusterParameterGroupName does not refer to an existing DB Cluster parameter group. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.RestoreDBClusterFromSnapshot * @see AWS API Documentation */ @Override public RestoreDbClusterFromSnapshotResponse restoreDBClusterFromSnapshot( RestoreDbClusterFromSnapshotRequest restoreDbClusterFromSnapshotRequest) throws DbClusterAlreadyExistsException, DbClusterQuotaExceededException, StorageQuotaExceededException, DbSubnetGroupNotFoundException, DbSnapshotNotFoundException, DbClusterSnapshotNotFoundException, InsufficientDbClusterCapacityException, InsufficientStorageClusterCapacityException, InvalidDbSnapshotStateException, InvalidDbClusterSnapshotStateException, InvalidVpcNetworkStateException, InvalidRestoreException, InvalidSubnetException, OptionGroupNotFoundException, KmsKeyNotAccessibleException, DbClusterParameterGroupNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RestoreDbClusterFromSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("RestoreDBClusterFromSnapshot").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(restoreDbClusterFromSnapshotRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RestoreDbClusterFromSnapshotRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the RestoreDBClusterToPointInTime operation returned by the service. * @throws DbClusterAlreadyExistsException * User already has a DB cluster with the given identifier. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws DbClusterQuotaExceededException * User attempted to create a new DB cluster and the user has already reached the maximum allowed DB cluster * quota. * @throws DbClusterSnapshotNotFoundException * DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. * @throws DbSubnetGroupNotFoundException * DBSubnetGroupName does not refer to an existing DB subnet group. * @throws InsufficientDbClusterCapacityException * The DB cluster does not have enough capacity for the current operation. * @throws 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. * @throws InvalidDbClusterSnapshotStateException * The supplied value is not a valid DB cluster snapshot state. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws InvalidDbSnapshotStateException * The state of the DB snapshot does not allow deletion. * @throws InvalidRestoreException * Cannot restore from vpc backup to non-vpc DB instance. * @throws InvalidSubnetException * The requested subnet is invalid, or multiple subnets were requested that are not all in a common VPC. * @throws InvalidVpcNetworkStateException * DB subnet group does not cover all Availability Zones after it is created because users' change. * @throws KmsKeyNotAccessibleException * Error accessing KMS key. * @throws OptionGroupNotFoundException * The designated option group could not be found. * @throws StorageQuotaExceededException * Request would result in user exceeding the allowed amount of storage available across all DB instances. * @throws DbClusterParameterGroupNotFoundException * DBClusterParameterGroupName does not refer to an existing DB Cluster parameter group. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.RestoreDBClusterToPointInTime * @see AWS API Documentation */ @Override public RestoreDbClusterToPointInTimeResponse restoreDBClusterToPointInTime( RestoreDbClusterToPointInTimeRequest restoreDbClusterToPointInTimeRequest) throws DbClusterAlreadyExistsException, DbClusterNotFoundException, DbClusterQuotaExceededException, DbClusterSnapshotNotFoundException, DbSubnetGroupNotFoundException, InsufficientDbClusterCapacityException, InsufficientStorageClusterCapacityException, InvalidDbClusterSnapshotStateException, InvalidDbClusterStateException, InvalidDbSnapshotStateException, InvalidRestoreException, InvalidSubnetException, InvalidVpcNetworkStateException, KmsKeyNotAccessibleException, OptionGroupNotFoundException, StorageQuotaExceededException, DbClusterParameterGroupNotFoundException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RestoreDbClusterToPointInTimeResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("RestoreDBClusterToPointInTime").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(restoreDbClusterToPointInTimeRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RestoreDbClusterToPointInTimeRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the StartDBCluster operation returned by the service. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws InvalidDbInstanceStateException * The specified DB instance is not in the available state. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.StartDBCluster * @see AWS API * Documentation */ @Override public StartDbClusterResponse startDBCluster(StartDbClusterRequest startDbClusterRequest) throws DbClusterNotFoundException, InvalidDbClusterStateException, InvalidDbInstanceStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(StartDbClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("StartDBCluster").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(startDbClusterRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartDbClusterRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the StopDBCluster operation returned by the service. * @throws DbClusterNotFoundException * DBClusterIdentifier does not refer to an existing DB cluster. * @throws InvalidDbClusterStateException * The DB cluster is not in a valid state. * @throws InvalidDbInstanceStateException * The specified DB instance is not in the available state. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NeptuneException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NeptuneClient.StopDBCluster * @see AWS API * Documentation */ @Override public StopDbClusterResponse stopDBCluster(StopDbClusterRequest stopDbClusterRequest) throws DbClusterNotFoundException, InvalidDbClusterStateException, InvalidDbInstanceStateException, AwsServiceException, SdkClientException, NeptuneException { HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(StopDbClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("StopDBCluster").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(stopDbClusterRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StopDbClusterRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } 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 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(); } @Override public void close() { clientHandler.close(); } private T applyPaginatorUserAgent(T request) { Consumer userAgentApplier = b -> b.addApiName(ApiName.builder() .version(VersionInfo.SDK_VERSION).name("PAGINATED").build()); AwsRequestOverrideConfiguration overrideConfiguration = request.overrideConfiguration() .map(c -> c.toBuilder().applyMutation(userAgentApplier).build()) .orElse((AwsRequestOverrideConfiguration.builder().applyMutation(userAgentApplier).build())); return (T) request.toBuilder().overrideConfiguration(overrideConfiguration).build(); } @Override public NeptuneWaiter waiter() { return NeptuneWaiter.builder().client(this).build(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy