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

software.amazon.awssdk.services.redshift.DefaultRedshiftAsyncClient Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.29.15
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.redshift;

import java.util.Collections;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ScheduledExecutorService;
import java.util.function.Consumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.client.handler.AwsAsyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.awscore.internal.AwsProtocolMetadata;
import software.amazon.awssdk.awscore.internal.AwsServiceProtocol;
import software.amazon.awssdk.awscore.retry.AwsRetryStrategy;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkPlugin;
import software.amazon.awssdk.core.SdkRequest;
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.AsyncClientHandler;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.retry.RetryMode;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.query.AwsQueryProtocolFactory;
import software.amazon.awssdk.retries.api.RetryStrategy;
import software.amazon.awssdk.services.redshift.internal.RedshiftServiceClientConfigurationBuilder;
import software.amazon.awssdk.services.redshift.model.AcceptReservedNodeExchangeRequest;
import software.amazon.awssdk.services.redshift.model.AcceptReservedNodeExchangeResponse;
import software.amazon.awssdk.services.redshift.model.AccessToClusterDeniedException;
import software.amazon.awssdk.services.redshift.model.AccessToSnapshotDeniedException;
import software.amazon.awssdk.services.redshift.model.AddPartnerRequest;
import software.amazon.awssdk.services.redshift.model.AddPartnerResponse;
import software.amazon.awssdk.services.redshift.model.AssociateDataShareConsumerRequest;
import software.amazon.awssdk.services.redshift.model.AssociateDataShareConsumerResponse;
import software.amazon.awssdk.services.redshift.model.AuthenticationProfileAlreadyExistsException;
import software.amazon.awssdk.services.redshift.model.AuthenticationProfileNotFoundException;
import software.amazon.awssdk.services.redshift.model.AuthenticationProfileQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.AuthorizationAlreadyExistsException;
import software.amazon.awssdk.services.redshift.model.AuthorizationNotFoundException;
import software.amazon.awssdk.services.redshift.model.AuthorizationQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.AuthorizeClusterSecurityGroupIngressRequest;
import software.amazon.awssdk.services.redshift.model.AuthorizeClusterSecurityGroupIngressResponse;
import software.amazon.awssdk.services.redshift.model.AuthorizeDataShareRequest;
import software.amazon.awssdk.services.redshift.model.AuthorizeDataShareResponse;
import software.amazon.awssdk.services.redshift.model.AuthorizeEndpointAccessRequest;
import software.amazon.awssdk.services.redshift.model.AuthorizeEndpointAccessResponse;
import software.amazon.awssdk.services.redshift.model.AuthorizeSnapshotAccessRequest;
import software.amazon.awssdk.services.redshift.model.AuthorizeSnapshotAccessResponse;
import software.amazon.awssdk.services.redshift.model.BatchDeleteClusterSnapshotsRequest;
import software.amazon.awssdk.services.redshift.model.BatchDeleteClusterSnapshotsResponse;
import software.amazon.awssdk.services.redshift.model.BatchDeleteRequestSizeExceededException;
import software.amazon.awssdk.services.redshift.model.BatchModifyClusterSnapshotsLimitExceededException;
import software.amazon.awssdk.services.redshift.model.BatchModifyClusterSnapshotsRequest;
import software.amazon.awssdk.services.redshift.model.BatchModifyClusterSnapshotsResponse;
import software.amazon.awssdk.services.redshift.model.BucketNotFoundException;
import software.amazon.awssdk.services.redshift.model.CancelResizeRequest;
import software.amazon.awssdk.services.redshift.model.CancelResizeResponse;
import software.amazon.awssdk.services.redshift.model.ClusterAlreadyExistsException;
import software.amazon.awssdk.services.redshift.model.ClusterNotFoundException;
import software.amazon.awssdk.services.redshift.model.ClusterOnLatestRevisionException;
import software.amazon.awssdk.services.redshift.model.ClusterParameterGroupAlreadyExistsException;
import software.amazon.awssdk.services.redshift.model.ClusterParameterGroupNotFoundException;
import software.amazon.awssdk.services.redshift.model.ClusterParameterGroupQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.ClusterQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.ClusterSecurityGroupAlreadyExistsException;
import software.amazon.awssdk.services.redshift.model.ClusterSecurityGroupNotFoundException;
import software.amazon.awssdk.services.redshift.model.ClusterSecurityGroupQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.ClusterSnapshotAlreadyExistsException;
import software.amazon.awssdk.services.redshift.model.ClusterSnapshotNotFoundException;
import software.amazon.awssdk.services.redshift.model.ClusterSnapshotQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.ClusterSubnetGroupAlreadyExistsException;
import software.amazon.awssdk.services.redshift.model.ClusterSubnetGroupNotFoundException;
import software.amazon.awssdk.services.redshift.model.ClusterSubnetGroupQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.ClusterSubnetQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.ConflictPolicyUpdateException;
import software.amazon.awssdk.services.redshift.model.CopyClusterSnapshotRequest;
import software.amazon.awssdk.services.redshift.model.CopyClusterSnapshotResponse;
import software.amazon.awssdk.services.redshift.model.CopyToRegionDisabledException;
import software.amazon.awssdk.services.redshift.model.CreateAuthenticationProfileRequest;
import software.amazon.awssdk.services.redshift.model.CreateAuthenticationProfileResponse;
import software.amazon.awssdk.services.redshift.model.CreateClusterParameterGroupRequest;
import software.amazon.awssdk.services.redshift.model.CreateClusterParameterGroupResponse;
import software.amazon.awssdk.services.redshift.model.CreateClusterRequest;
import software.amazon.awssdk.services.redshift.model.CreateClusterResponse;
import software.amazon.awssdk.services.redshift.model.CreateClusterSecurityGroupRequest;
import software.amazon.awssdk.services.redshift.model.CreateClusterSecurityGroupResponse;
import software.amazon.awssdk.services.redshift.model.CreateClusterSnapshotRequest;
import software.amazon.awssdk.services.redshift.model.CreateClusterSnapshotResponse;
import software.amazon.awssdk.services.redshift.model.CreateClusterSubnetGroupRequest;
import software.amazon.awssdk.services.redshift.model.CreateClusterSubnetGroupResponse;
import software.amazon.awssdk.services.redshift.model.CreateCustomDomainAssociationRequest;
import software.amazon.awssdk.services.redshift.model.CreateCustomDomainAssociationResponse;
import software.amazon.awssdk.services.redshift.model.CreateEndpointAccessRequest;
import software.amazon.awssdk.services.redshift.model.CreateEndpointAccessResponse;
import software.amazon.awssdk.services.redshift.model.CreateEventSubscriptionRequest;
import software.amazon.awssdk.services.redshift.model.CreateEventSubscriptionResponse;
import software.amazon.awssdk.services.redshift.model.CreateHsmClientCertificateRequest;
import software.amazon.awssdk.services.redshift.model.CreateHsmClientCertificateResponse;
import software.amazon.awssdk.services.redshift.model.CreateHsmConfigurationRequest;
import software.amazon.awssdk.services.redshift.model.CreateHsmConfigurationResponse;
import software.amazon.awssdk.services.redshift.model.CreateRedshiftIdcApplicationRequest;
import software.amazon.awssdk.services.redshift.model.CreateRedshiftIdcApplicationResponse;
import software.amazon.awssdk.services.redshift.model.CreateScheduledActionRequest;
import software.amazon.awssdk.services.redshift.model.CreateScheduledActionResponse;
import software.amazon.awssdk.services.redshift.model.CreateSnapshotCopyGrantRequest;
import software.amazon.awssdk.services.redshift.model.CreateSnapshotCopyGrantResponse;
import software.amazon.awssdk.services.redshift.model.CreateSnapshotScheduleRequest;
import software.amazon.awssdk.services.redshift.model.CreateSnapshotScheduleResponse;
import software.amazon.awssdk.services.redshift.model.CreateTagsRequest;
import software.amazon.awssdk.services.redshift.model.CreateTagsResponse;
import software.amazon.awssdk.services.redshift.model.CreateUsageLimitRequest;
import software.amazon.awssdk.services.redshift.model.CreateUsageLimitResponse;
import software.amazon.awssdk.services.redshift.model.CustomCnameAssociationException;
import software.amazon.awssdk.services.redshift.model.CustomDomainAssociationNotFoundException;
import software.amazon.awssdk.services.redshift.model.DeauthorizeDataShareRequest;
import software.amazon.awssdk.services.redshift.model.DeauthorizeDataShareResponse;
import software.amazon.awssdk.services.redshift.model.DeleteAuthenticationProfileRequest;
import software.amazon.awssdk.services.redshift.model.DeleteAuthenticationProfileResponse;
import software.amazon.awssdk.services.redshift.model.DeleteClusterParameterGroupRequest;
import software.amazon.awssdk.services.redshift.model.DeleteClusterParameterGroupResponse;
import software.amazon.awssdk.services.redshift.model.DeleteClusterRequest;
import software.amazon.awssdk.services.redshift.model.DeleteClusterResponse;
import software.amazon.awssdk.services.redshift.model.DeleteClusterSecurityGroupRequest;
import software.amazon.awssdk.services.redshift.model.DeleteClusterSecurityGroupResponse;
import software.amazon.awssdk.services.redshift.model.DeleteClusterSnapshotRequest;
import software.amazon.awssdk.services.redshift.model.DeleteClusterSnapshotResponse;
import software.amazon.awssdk.services.redshift.model.DeleteClusterSubnetGroupRequest;
import software.amazon.awssdk.services.redshift.model.DeleteClusterSubnetGroupResponse;
import software.amazon.awssdk.services.redshift.model.DeleteCustomDomainAssociationRequest;
import software.amazon.awssdk.services.redshift.model.DeleteCustomDomainAssociationResponse;
import software.amazon.awssdk.services.redshift.model.DeleteEndpointAccessRequest;
import software.amazon.awssdk.services.redshift.model.DeleteEndpointAccessResponse;
import software.amazon.awssdk.services.redshift.model.DeleteEventSubscriptionRequest;
import software.amazon.awssdk.services.redshift.model.DeleteEventSubscriptionResponse;
import software.amazon.awssdk.services.redshift.model.DeleteHsmClientCertificateRequest;
import software.amazon.awssdk.services.redshift.model.DeleteHsmClientCertificateResponse;
import software.amazon.awssdk.services.redshift.model.DeleteHsmConfigurationRequest;
import software.amazon.awssdk.services.redshift.model.DeleteHsmConfigurationResponse;
import software.amazon.awssdk.services.redshift.model.DeletePartnerRequest;
import software.amazon.awssdk.services.redshift.model.DeletePartnerResponse;
import software.amazon.awssdk.services.redshift.model.DeleteRedshiftIdcApplicationRequest;
import software.amazon.awssdk.services.redshift.model.DeleteRedshiftIdcApplicationResponse;
import software.amazon.awssdk.services.redshift.model.DeleteResourcePolicyRequest;
import software.amazon.awssdk.services.redshift.model.DeleteResourcePolicyResponse;
import software.amazon.awssdk.services.redshift.model.DeleteScheduledActionRequest;
import software.amazon.awssdk.services.redshift.model.DeleteScheduledActionResponse;
import software.amazon.awssdk.services.redshift.model.DeleteSnapshotCopyGrantRequest;
import software.amazon.awssdk.services.redshift.model.DeleteSnapshotCopyGrantResponse;
import software.amazon.awssdk.services.redshift.model.DeleteSnapshotScheduleRequest;
import software.amazon.awssdk.services.redshift.model.DeleteSnapshotScheduleResponse;
import software.amazon.awssdk.services.redshift.model.DeleteTagsRequest;
import software.amazon.awssdk.services.redshift.model.DeleteTagsResponse;
import software.amazon.awssdk.services.redshift.model.DeleteUsageLimitRequest;
import software.amazon.awssdk.services.redshift.model.DeleteUsageLimitResponse;
import software.amazon.awssdk.services.redshift.model.DependentServiceAccessDeniedException;
import software.amazon.awssdk.services.redshift.model.DependentServiceRequestThrottlingException;
import software.amazon.awssdk.services.redshift.model.DependentServiceUnavailableException;
import software.amazon.awssdk.services.redshift.model.DescribeAccountAttributesRequest;
import software.amazon.awssdk.services.redshift.model.DescribeAccountAttributesResponse;
import software.amazon.awssdk.services.redshift.model.DescribeAuthenticationProfilesRequest;
import software.amazon.awssdk.services.redshift.model.DescribeAuthenticationProfilesResponse;
import software.amazon.awssdk.services.redshift.model.DescribeClusterDbRevisionsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeClusterDbRevisionsResponse;
import software.amazon.awssdk.services.redshift.model.DescribeClusterParameterGroupsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeClusterParameterGroupsResponse;
import software.amazon.awssdk.services.redshift.model.DescribeClusterParametersRequest;
import software.amazon.awssdk.services.redshift.model.DescribeClusterParametersResponse;
import software.amazon.awssdk.services.redshift.model.DescribeClusterSecurityGroupsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeClusterSecurityGroupsResponse;
import software.amazon.awssdk.services.redshift.model.DescribeClusterSnapshotsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeClusterSnapshotsResponse;
import software.amazon.awssdk.services.redshift.model.DescribeClusterSubnetGroupsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeClusterSubnetGroupsResponse;
import software.amazon.awssdk.services.redshift.model.DescribeClusterTracksRequest;
import software.amazon.awssdk.services.redshift.model.DescribeClusterTracksResponse;
import software.amazon.awssdk.services.redshift.model.DescribeClusterVersionsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeClusterVersionsResponse;
import software.amazon.awssdk.services.redshift.model.DescribeClustersRequest;
import software.amazon.awssdk.services.redshift.model.DescribeClustersResponse;
import software.amazon.awssdk.services.redshift.model.DescribeCustomDomainAssociationsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeCustomDomainAssociationsResponse;
import software.amazon.awssdk.services.redshift.model.DescribeDataSharesForConsumerRequest;
import software.amazon.awssdk.services.redshift.model.DescribeDataSharesForConsumerResponse;
import software.amazon.awssdk.services.redshift.model.DescribeDataSharesForProducerRequest;
import software.amazon.awssdk.services.redshift.model.DescribeDataSharesForProducerResponse;
import software.amazon.awssdk.services.redshift.model.DescribeDataSharesRequest;
import software.amazon.awssdk.services.redshift.model.DescribeDataSharesResponse;
import software.amazon.awssdk.services.redshift.model.DescribeDefaultClusterParametersRequest;
import software.amazon.awssdk.services.redshift.model.DescribeDefaultClusterParametersResponse;
import software.amazon.awssdk.services.redshift.model.DescribeEndpointAccessRequest;
import software.amazon.awssdk.services.redshift.model.DescribeEndpointAccessResponse;
import software.amazon.awssdk.services.redshift.model.DescribeEndpointAuthorizationRequest;
import software.amazon.awssdk.services.redshift.model.DescribeEndpointAuthorizationResponse;
import software.amazon.awssdk.services.redshift.model.DescribeEventCategoriesRequest;
import software.amazon.awssdk.services.redshift.model.DescribeEventCategoriesResponse;
import software.amazon.awssdk.services.redshift.model.DescribeEventSubscriptionsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeEventSubscriptionsResponse;
import software.amazon.awssdk.services.redshift.model.DescribeEventsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeEventsResponse;
import software.amazon.awssdk.services.redshift.model.DescribeHsmClientCertificatesRequest;
import software.amazon.awssdk.services.redshift.model.DescribeHsmClientCertificatesResponse;
import software.amazon.awssdk.services.redshift.model.DescribeHsmConfigurationsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeHsmConfigurationsResponse;
import software.amazon.awssdk.services.redshift.model.DescribeInboundIntegrationsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeInboundIntegrationsResponse;
import software.amazon.awssdk.services.redshift.model.DescribeLoggingStatusRequest;
import software.amazon.awssdk.services.redshift.model.DescribeLoggingStatusResponse;
import software.amazon.awssdk.services.redshift.model.DescribeNodeConfigurationOptionsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeNodeConfigurationOptionsResponse;
import software.amazon.awssdk.services.redshift.model.DescribeOrderableClusterOptionsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeOrderableClusterOptionsResponse;
import software.amazon.awssdk.services.redshift.model.DescribePartnersRequest;
import software.amazon.awssdk.services.redshift.model.DescribePartnersResponse;
import software.amazon.awssdk.services.redshift.model.DescribeRedshiftIdcApplicationsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeRedshiftIdcApplicationsResponse;
import software.amazon.awssdk.services.redshift.model.DescribeReservedNodeExchangeStatusRequest;
import software.amazon.awssdk.services.redshift.model.DescribeReservedNodeExchangeStatusResponse;
import software.amazon.awssdk.services.redshift.model.DescribeReservedNodeOfferingsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeReservedNodeOfferingsResponse;
import software.amazon.awssdk.services.redshift.model.DescribeReservedNodesRequest;
import software.amazon.awssdk.services.redshift.model.DescribeReservedNodesResponse;
import software.amazon.awssdk.services.redshift.model.DescribeResizeRequest;
import software.amazon.awssdk.services.redshift.model.DescribeResizeResponse;
import software.amazon.awssdk.services.redshift.model.DescribeScheduledActionsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeScheduledActionsResponse;
import software.amazon.awssdk.services.redshift.model.DescribeSnapshotCopyGrantsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeSnapshotCopyGrantsResponse;
import software.amazon.awssdk.services.redshift.model.DescribeSnapshotSchedulesRequest;
import software.amazon.awssdk.services.redshift.model.DescribeSnapshotSchedulesResponse;
import software.amazon.awssdk.services.redshift.model.DescribeStorageRequest;
import software.amazon.awssdk.services.redshift.model.DescribeStorageResponse;
import software.amazon.awssdk.services.redshift.model.DescribeTableRestoreStatusRequest;
import software.amazon.awssdk.services.redshift.model.DescribeTableRestoreStatusResponse;
import software.amazon.awssdk.services.redshift.model.DescribeTagsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeTagsResponse;
import software.amazon.awssdk.services.redshift.model.DescribeUsageLimitsRequest;
import software.amazon.awssdk.services.redshift.model.DescribeUsageLimitsResponse;
import software.amazon.awssdk.services.redshift.model.DisableLoggingRequest;
import software.amazon.awssdk.services.redshift.model.DisableLoggingResponse;
import software.amazon.awssdk.services.redshift.model.DisableSnapshotCopyRequest;
import software.amazon.awssdk.services.redshift.model.DisableSnapshotCopyResponse;
import software.amazon.awssdk.services.redshift.model.DisassociateDataShareConsumerRequest;
import software.amazon.awssdk.services.redshift.model.DisassociateDataShareConsumerResponse;
import software.amazon.awssdk.services.redshift.model.EnableLoggingRequest;
import software.amazon.awssdk.services.redshift.model.EnableLoggingResponse;
import software.amazon.awssdk.services.redshift.model.EnableSnapshotCopyRequest;
import software.amazon.awssdk.services.redshift.model.EnableSnapshotCopyResponse;
import software.amazon.awssdk.services.redshift.model.EndpointAlreadyExistsException;
import software.amazon.awssdk.services.redshift.model.EndpointAuthorizationAlreadyExistsException;
import software.amazon.awssdk.services.redshift.model.EndpointAuthorizationNotFoundException;
import software.amazon.awssdk.services.redshift.model.EndpointAuthorizationsPerClusterLimitExceededException;
import software.amazon.awssdk.services.redshift.model.EndpointNotFoundException;
import software.amazon.awssdk.services.redshift.model.EndpointsPerAuthorizationLimitExceededException;
import software.amazon.awssdk.services.redshift.model.EndpointsPerClusterLimitExceededException;
import software.amazon.awssdk.services.redshift.model.EventSubscriptionQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.FailoverPrimaryComputeRequest;
import software.amazon.awssdk.services.redshift.model.FailoverPrimaryComputeResponse;
import software.amazon.awssdk.services.redshift.model.GetClusterCredentialsRequest;
import software.amazon.awssdk.services.redshift.model.GetClusterCredentialsResponse;
import software.amazon.awssdk.services.redshift.model.GetClusterCredentialsWithIamRequest;
import software.amazon.awssdk.services.redshift.model.GetClusterCredentialsWithIamResponse;
import software.amazon.awssdk.services.redshift.model.GetReservedNodeExchangeConfigurationOptionsRequest;
import software.amazon.awssdk.services.redshift.model.GetReservedNodeExchangeConfigurationOptionsResponse;
import software.amazon.awssdk.services.redshift.model.GetReservedNodeExchangeOfferingsRequest;
import software.amazon.awssdk.services.redshift.model.GetReservedNodeExchangeOfferingsResponse;
import software.amazon.awssdk.services.redshift.model.GetResourcePolicyRequest;
import software.amazon.awssdk.services.redshift.model.GetResourcePolicyResponse;
import software.amazon.awssdk.services.redshift.model.HsmClientCertificateAlreadyExistsException;
import software.amazon.awssdk.services.redshift.model.HsmClientCertificateNotFoundException;
import software.amazon.awssdk.services.redshift.model.HsmClientCertificateQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.HsmConfigurationAlreadyExistsException;
import software.amazon.awssdk.services.redshift.model.HsmConfigurationNotFoundException;
import software.amazon.awssdk.services.redshift.model.HsmConfigurationQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.InProgressTableRestoreQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.IncompatibleOrderableOptionsException;
import software.amazon.awssdk.services.redshift.model.InsufficientClusterCapacityException;
import software.amazon.awssdk.services.redshift.model.InsufficientS3BucketPolicyException;
import software.amazon.awssdk.services.redshift.model.IntegrationNotFoundException;
import software.amazon.awssdk.services.redshift.model.InvalidAuthenticationProfileRequestException;
import software.amazon.awssdk.services.redshift.model.InvalidAuthorizationStateException;
import software.amazon.awssdk.services.redshift.model.InvalidClusterParameterGroupStateException;
import software.amazon.awssdk.services.redshift.model.InvalidClusterSecurityGroupStateException;
import software.amazon.awssdk.services.redshift.model.InvalidClusterSnapshotScheduleStateException;
import software.amazon.awssdk.services.redshift.model.InvalidClusterSnapshotStateException;
import software.amazon.awssdk.services.redshift.model.InvalidClusterStateException;
import software.amazon.awssdk.services.redshift.model.InvalidClusterSubnetGroupStateException;
import software.amazon.awssdk.services.redshift.model.InvalidClusterSubnetStateException;
import software.amazon.awssdk.services.redshift.model.InvalidClusterTrackException;
import software.amazon.awssdk.services.redshift.model.InvalidDataShareException;
import software.amazon.awssdk.services.redshift.model.InvalidElasticIpException;
import software.amazon.awssdk.services.redshift.model.InvalidEndpointStateException;
import software.amazon.awssdk.services.redshift.model.InvalidHsmClientCertificateStateException;
import software.amazon.awssdk.services.redshift.model.InvalidHsmConfigurationStateException;
import software.amazon.awssdk.services.redshift.model.InvalidNamespaceException;
import software.amazon.awssdk.services.redshift.model.InvalidPolicyException;
import software.amazon.awssdk.services.redshift.model.InvalidReservedNodeStateException;
import software.amazon.awssdk.services.redshift.model.InvalidRestoreException;
import software.amazon.awssdk.services.redshift.model.InvalidRetentionPeriodException;
import software.amazon.awssdk.services.redshift.model.InvalidS3BucketNameException;
import software.amazon.awssdk.services.redshift.model.InvalidS3KeyPrefixException;
import software.amazon.awssdk.services.redshift.model.InvalidScheduleException;
import software.amazon.awssdk.services.redshift.model.InvalidScheduledActionException;
import software.amazon.awssdk.services.redshift.model.InvalidSnapshotCopyGrantStateException;
import software.amazon.awssdk.services.redshift.model.InvalidSubnetException;
import software.amazon.awssdk.services.redshift.model.InvalidSubscriptionStateException;
import software.amazon.awssdk.services.redshift.model.InvalidTableRestoreArgumentException;
import software.amazon.awssdk.services.redshift.model.InvalidTagException;
import software.amazon.awssdk.services.redshift.model.InvalidUsageLimitException;
import software.amazon.awssdk.services.redshift.model.InvalidVpcNetworkStateException;
import software.amazon.awssdk.services.redshift.model.Ipv6CidrBlockNotFoundException;
import software.amazon.awssdk.services.redshift.model.LimitExceededException;
import software.amazon.awssdk.services.redshift.model.ListRecommendationsRequest;
import software.amazon.awssdk.services.redshift.model.ListRecommendationsResponse;
import software.amazon.awssdk.services.redshift.model.ModifyAquaConfigurationRequest;
import software.amazon.awssdk.services.redshift.model.ModifyAquaConfigurationResponse;
import software.amazon.awssdk.services.redshift.model.ModifyAuthenticationProfileRequest;
import software.amazon.awssdk.services.redshift.model.ModifyAuthenticationProfileResponse;
import software.amazon.awssdk.services.redshift.model.ModifyClusterDbRevisionRequest;
import software.amazon.awssdk.services.redshift.model.ModifyClusterDbRevisionResponse;
import software.amazon.awssdk.services.redshift.model.ModifyClusterIamRolesRequest;
import software.amazon.awssdk.services.redshift.model.ModifyClusterIamRolesResponse;
import software.amazon.awssdk.services.redshift.model.ModifyClusterMaintenanceRequest;
import software.amazon.awssdk.services.redshift.model.ModifyClusterMaintenanceResponse;
import software.amazon.awssdk.services.redshift.model.ModifyClusterParameterGroupRequest;
import software.amazon.awssdk.services.redshift.model.ModifyClusterParameterGroupResponse;
import software.amazon.awssdk.services.redshift.model.ModifyClusterRequest;
import software.amazon.awssdk.services.redshift.model.ModifyClusterResponse;
import software.amazon.awssdk.services.redshift.model.ModifyClusterSnapshotRequest;
import software.amazon.awssdk.services.redshift.model.ModifyClusterSnapshotResponse;
import software.amazon.awssdk.services.redshift.model.ModifyClusterSnapshotScheduleRequest;
import software.amazon.awssdk.services.redshift.model.ModifyClusterSnapshotScheduleResponse;
import software.amazon.awssdk.services.redshift.model.ModifyClusterSubnetGroupRequest;
import software.amazon.awssdk.services.redshift.model.ModifyClusterSubnetGroupResponse;
import software.amazon.awssdk.services.redshift.model.ModifyCustomDomainAssociationRequest;
import software.amazon.awssdk.services.redshift.model.ModifyCustomDomainAssociationResponse;
import software.amazon.awssdk.services.redshift.model.ModifyEndpointAccessRequest;
import software.amazon.awssdk.services.redshift.model.ModifyEndpointAccessResponse;
import software.amazon.awssdk.services.redshift.model.ModifyEventSubscriptionRequest;
import software.amazon.awssdk.services.redshift.model.ModifyEventSubscriptionResponse;
import software.amazon.awssdk.services.redshift.model.ModifyRedshiftIdcApplicationRequest;
import software.amazon.awssdk.services.redshift.model.ModifyRedshiftIdcApplicationResponse;
import software.amazon.awssdk.services.redshift.model.ModifyScheduledActionRequest;
import software.amazon.awssdk.services.redshift.model.ModifyScheduledActionResponse;
import software.amazon.awssdk.services.redshift.model.ModifySnapshotCopyRetentionPeriodRequest;
import software.amazon.awssdk.services.redshift.model.ModifySnapshotCopyRetentionPeriodResponse;
import software.amazon.awssdk.services.redshift.model.ModifySnapshotScheduleRequest;
import software.amazon.awssdk.services.redshift.model.ModifySnapshotScheduleResponse;
import software.amazon.awssdk.services.redshift.model.ModifyUsageLimitRequest;
import software.amazon.awssdk.services.redshift.model.ModifyUsageLimitResponse;
import software.amazon.awssdk.services.redshift.model.NumberOfNodesPerClusterLimitExceededException;
import software.amazon.awssdk.services.redshift.model.NumberOfNodesQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.PartnerNotFoundException;
import software.amazon.awssdk.services.redshift.model.PauseClusterRequest;
import software.amazon.awssdk.services.redshift.model.PauseClusterResponse;
import software.amazon.awssdk.services.redshift.model.PurchaseReservedNodeOfferingRequest;
import software.amazon.awssdk.services.redshift.model.PurchaseReservedNodeOfferingResponse;
import software.amazon.awssdk.services.redshift.model.PutResourcePolicyRequest;
import software.amazon.awssdk.services.redshift.model.PutResourcePolicyResponse;
import software.amazon.awssdk.services.redshift.model.RebootClusterRequest;
import software.amazon.awssdk.services.redshift.model.RebootClusterResponse;
import software.amazon.awssdk.services.redshift.model.RedshiftException;
import software.amazon.awssdk.services.redshift.model.RedshiftIdcApplicationAlreadyExistsException;
import software.amazon.awssdk.services.redshift.model.RedshiftIdcApplicationNotExistsException;
import software.amazon.awssdk.services.redshift.model.RedshiftIdcApplicationQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.RejectDataShareRequest;
import software.amazon.awssdk.services.redshift.model.RejectDataShareResponse;
import software.amazon.awssdk.services.redshift.model.ReservedNodeAlreadyExistsException;
import software.amazon.awssdk.services.redshift.model.ReservedNodeAlreadyMigratedException;
import software.amazon.awssdk.services.redshift.model.ReservedNodeExchangeNotFoundException;
import software.amazon.awssdk.services.redshift.model.ReservedNodeNotFoundException;
import software.amazon.awssdk.services.redshift.model.ReservedNodeOfferingNotFoundException;
import software.amazon.awssdk.services.redshift.model.ReservedNodeQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.ResetClusterParameterGroupRequest;
import software.amazon.awssdk.services.redshift.model.ResetClusterParameterGroupResponse;
import software.amazon.awssdk.services.redshift.model.ResizeClusterRequest;
import software.amazon.awssdk.services.redshift.model.ResizeClusterResponse;
import software.amazon.awssdk.services.redshift.model.ResizeNotFoundException;
import software.amazon.awssdk.services.redshift.model.ResourceNotFoundException;
import software.amazon.awssdk.services.redshift.model.RestoreFromClusterSnapshotRequest;
import software.amazon.awssdk.services.redshift.model.RestoreFromClusterSnapshotResponse;
import software.amazon.awssdk.services.redshift.model.RestoreTableFromClusterSnapshotRequest;
import software.amazon.awssdk.services.redshift.model.RestoreTableFromClusterSnapshotResponse;
import software.amazon.awssdk.services.redshift.model.ResumeClusterRequest;
import software.amazon.awssdk.services.redshift.model.ResumeClusterResponse;
import software.amazon.awssdk.services.redshift.model.RevokeClusterSecurityGroupIngressRequest;
import software.amazon.awssdk.services.redshift.model.RevokeClusterSecurityGroupIngressResponse;
import software.amazon.awssdk.services.redshift.model.RevokeEndpointAccessRequest;
import software.amazon.awssdk.services.redshift.model.RevokeEndpointAccessResponse;
import software.amazon.awssdk.services.redshift.model.RevokeSnapshotAccessRequest;
import software.amazon.awssdk.services.redshift.model.RevokeSnapshotAccessResponse;
import software.amazon.awssdk.services.redshift.model.RotateEncryptionKeyRequest;
import software.amazon.awssdk.services.redshift.model.RotateEncryptionKeyResponse;
import software.amazon.awssdk.services.redshift.model.ScheduleDefinitionTypeUnsupportedException;
import software.amazon.awssdk.services.redshift.model.ScheduledActionAlreadyExistsException;
import software.amazon.awssdk.services.redshift.model.ScheduledActionNotFoundException;
import software.amazon.awssdk.services.redshift.model.ScheduledActionQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.ScheduledActionTypeUnsupportedException;
import software.amazon.awssdk.services.redshift.model.SnapshotCopyAlreadyDisabledException;
import software.amazon.awssdk.services.redshift.model.SnapshotCopyAlreadyEnabledException;
import software.amazon.awssdk.services.redshift.model.SnapshotCopyDisabledException;
import software.amazon.awssdk.services.redshift.model.SnapshotCopyGrantAlreadyExistsException;
import software.amazon.awssdk.services.redshift.model.SnapshotCopyGrantNotFoundException;
import software.amazon.awssdk.services.redshift.model.SnapshotCopyGrantQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.SnapshotScheduleAlreadyExistsException;
import software.amazon.awssdk.services.redshift.model.SnapshotScheduleNotFoundException;
import software.amazon.awssdk.services.redshift.model.SnapshotScheduleQuotaExceededException;
import software.amazon.awssdk.services.redshift.model.SnapshotScheduleUpdateInProgressException;
import software.amazon.awssdk.services.redshift.model.SnsInvalidTopicException;
import software.amazon.awssdk.services.redshift.model.SnsNoAuthorizationException;
import software.amazon.awssdk.services.redshift.model.SnsTopicArnNotFoundException;
import software.amazon.awssdk.services.redshift.model.SourceNotFoundException;
import software.amazon.awssdk.services.redshift.model.SubnetAlreadyInUseException;
import software.amazon.awssdk.services.redshift.model.SubscriptionAlreadyExistException;
import software.amazon.awssdk.services.redshift.model.SubscriptionCategoryNotFoundException;
import software.amazon.awssdk.services.redshift.model.SubscriptionEventIdNotFoundException;
import software.amazon.awssdk.services.redshift.model.SubscriptionNotFoundException;
import software.amazon.awssdk.services.redshift.model.SubscriptionSeverityNotFoundException;
import software.amazon.awssdk.services.redshift.model.TableLimitExceededException;
import software.amazon.awssdk.services.redshift.model.TableRestoreNotFoundException;
import software.amazon.awssdk.services.redshift.model.TagLimitExceededException;
import software.amazon.awssdk.services.redshift.model.UnauthorizedOperationException;
import software.amazon.awssdk.services.redshift.model.UnauthorizedPartnerIntegrationException;
import software.amazon.awssdk.services.redshift.model.UnknownSnapshotCopyRegionException;
import software.amazon.awssdk.services.redshift.model.UnsupportedOperationException;
import software.amazon.awssdk.services.redshift.model.UnsupportedOptionException;
import software.amazon.awssdk.services.redshift.model.UpdatePartnerStatusRequest;
import software.amazon.awssdk.services.redshift.model.UpdatePartnerStatusResponse;
import software.amazon.awssdk.services.redshift.model.UsageLimitAlreadyExistsException;
import software.amazon.awssdk.services.redshift.model.UsageLimitNotFoundException;
import software.amazon.awssdk.services.redshift.transform.AcceptReservedNodeExchangeRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.AddPartnerRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.AssociateDataShareConsumerRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.AuthorizeClusterSecurityGroupIngressRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.AuthorizeDataShareRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.AuthorizeEndpointAccessRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.AuthorizeSnapshotAccessRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.BatchDeleteClusterSnapshotsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.BatchModifyClusterSnapshotsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CancelResizeRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CopyClusterSnapshotRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CreateAuthenticationProfileRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CreateClusterParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CreateClusterRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CreateClusterSecurityGroupRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CreateClusterSnapshotRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CreateClusterSubnetGroupRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CreateCustomDomainAssociationRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CreateEndpointAccessRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CreateEventSubscriptionRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CreateHsmClientCertificateRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CreateHsmConfigurationRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CreateRedshiftIdcApplicationRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CreateScheduledActionRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CreateSnapshotCopyGrantRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CreateSnapshotScheduleRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CreateTagsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.CreateUsageLimitRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeauthorizeDataShareRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteAuthenticationProfileRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteClusterParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteClusterRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteClusterSecurityGroupRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteClusterSnapshotRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteClusterSubnetGroupRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteCustomDomainAssociationRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteEndpointAccessRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteEventSubscriptionRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteHsmClientCertificateRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteHsmConfigurationRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeletePartnerRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteRedshiftIdcApplicationRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteResourcePolicyRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteScheduledActionRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteSnapshotCopyGrantRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteSnapshotScheduleRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteTagsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DeleteUsageLimitRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeAccountAttributesRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeAuthenticationProfilesRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeClusterDbRevisionsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeClusterParameterGroupsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeClusterParametersRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeClusterSecurityGroupsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeClusterSnapshotsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeClusterSubnetGroupsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeClusterTracksRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeClusterVersionsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeClustersRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeCustomDomainAssociationsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeDataSharesForConsumerRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeDataSharesForProducerRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeDataSharesRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeDefaultClusterParametersRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeEndpointAccessRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeEndpointAuthorizationRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeEventCategoriesRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeEventSubscriptionsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeEventsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeHsmClientCertificatesRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeHsmConfigurationsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeInboundIntegrationsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeLoggingStatusRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeNodeConfigurationOptionsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeOrderableClusterOptionsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribePartnersRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeRedshiftIdcApplicationsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeReservedNodeExchangeStatusRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeReservedNodeOfferingsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeReservedNodesRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeResizeRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeScheduledActionsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeSnapshotCopyGrantsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeSnapshotSchedulesRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeStorageRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeTableRestoreStatusRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeTagsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DescribeUsageLimitsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DisableLoggingRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DisableSnapshotCopyRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.DisassociateDataShareConsumerRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.EnableLoggingRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.EnableSnapshotCopyRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.FailoverPrimaryComputeRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.GetClusterCredentialsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.GetClusterCredentialsWithIamRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.GetReservedNodeExchangeConfigurationOptionsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.GetReservedNodeExchangeOfferingsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.GetResourcePolicyRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ListRecommendationsRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifyAquaConfigurationRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifyAuthenticationProfileRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifyClusterDbRevisionRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifyClusterIamRolesRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifyClusterMaintenanceRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifyClusterParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifyClusterRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifyClusterSnapshotRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifyClusterSnapshotScheduleRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifyClusterSubnetGroupRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifyCustomDomainAssociationRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifyEndpointAccessRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifyEventSubscriptionRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifyRedshiftIdcApplicationRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifyScheduledActionRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifySnapshotCopyRetentionPeriodRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifySnapshotScheduleRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ModifyUsageLimitRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.PauseClusterRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.PurchaseReservedNodeOfferingRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.PutResourcePolicyRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.RebootClusterRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.RejectDataShareRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ResetClusterParameterGroupRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ResizeClusterRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.RestoreFromClusterSnapshotRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.RestoreTableFromClusterSnapshotRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.ResumeClusterRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.RevokeClusterSecurityGroupIngressRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.RevokeEndpointAccessRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.RevokeSnapshotAccessRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.RotateEncryptionKeyRequestMarshaller;
import software.amazon.awssdk.services.redshift.transform.UpdatePartnerStatusRequestMarshaller;
import software.amazon.awssdk.services.redshift.waiters.RedshiftAsyncWaiter;
import software.amazon.awssdk.utils.CompletableFutureUtils;

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

    private static final AwsProtocolMetadata protocolMetadata = AwsProtocolMetadata.builder()
            .serviceProtocol(AwsServiceProtocol.QUERY).build();

    private final AsyncClientHandler clientHandler;

    private final AwsQueryProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

    private final ScheduledExecutorService executorService;

    protected DefaultRedshiftAsyncClient(SdkClientConfiguration clientConfiguration) {
        this.clientHandler = new AwsAsyncClientHandler(clientConfiguration);
        this.clientConfiguration = clientConfiguration.toBuilder().option(SdkClientOption.SDK_CLIENT, this).build();
        this.protocolFactory = init();
        this.executorService = clientConfiguration.option(SdkClientOption.SCHEDULED_EXECUTOR_SERVICE);
    }

    /**
     * 

* Exchanges a DC1 Reserved Node for a DC2 Reserved Node with no changes to the configuration (term, payment type, * or number of nodes) and no additional costs. *

* * @param acceptReservedNodeExchangeRequest * @return A Java Future containing the result of the AcceptReservedNodeExchange operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ReservedNodeNotFoundException The specified reserved compute node not found.
  • *
  • InvalidReservedNodeStateException Indicates that the Reserved Node being exchanged is not in an * active state.
  • *
  • ReservedNodeAlreadyMigratedException Indicates that the reserved node has already been exchanged.
  • *
  • ReservedNodeOfferingNotFoundException Specified offering does not exist.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • DependentServiceUnavailableException Your request cannot be completed because a dependent internal * service is temporarily unavailable. Wait 30 to 60 seconds and try again.
  • *
  • ReservedNodeAlreadyExistsException User already has a reservation with the given identifier.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.AcceptReservedNodeExchange * @see AWS API Documentation */ @Override public CompletableFuture acceptReservedNodeExchange( AcceptReservedNodeExchangeRequest acceptReservedNodeExchangeRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(acceptReservedNodeExchangeRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, acceptReservedNodeExchangeRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AcceptReservedNodeExchange"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(AcceptReservedNodeExchangeResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AcceptReservedNodeExchange").withProtocolMetadata(protocolMetadata) .withMarshaller(new AcceptReservedNodeExchangeRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(acceptReservedNodeExchangeRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds a partner integration to a cluster. This operation authorizes a partner to push status updates for the * specified database. To complete the integration, you also set up the integration on the partner website. *

* * @param addPartnerRequest * @return A Java Future containing the result of the AddPartner operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • PartnerNotFoundException The name of the partner was not found.
  • *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • UnauthorizedPartnerIntegrationException The partner integration is not authorized.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.AddPartner * @see AWS API * Documentation */ @Override public CompletableFuture addPartner(AddPartnerRequest addPartnerRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(addPartnerRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, addPartnerRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AddPartner"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(AddPartnerResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("AddPartner") .withProtocolMetadata(protocolMetadata) .withMarshaller(new AddPartnerRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(addPartnerRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* From a datashare consumer account, associates a datashare with the account (AssociateEntireAccount) or the * specified namespace (ConsumerArn). If you make this association, the consumer can consume the datashare. *

* * @param associateDataShareConsumerRequest * @return A Java Future containing the result of the AssociateDataShareConsumer operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidDataShareException There is an error with the datashare.
  • *
  • InvalidNamespaceException The namespace isn't valid because the namespace doesn't exist. Provide a * valid namespace.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.AssociateDataShareConsumer * @see AWS API Documentation */ @Override public CompletableFuture associateDataShareConsumer( AssociateDataShareConsumerRequest associateDataShareConsumerRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateDataShareConsumerRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, associateDataShareConsumerRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateDataShareConsumer"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(AssociateDataShareConsumerResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateDataShareConsumer").withProtocolMetadata(protocolMetadata) .withMarshaller(new AssociateDataShareConsumerRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(associateDataShareConsumerRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds an inbound (ingress) rule to an Amazon Redshift security group. Depending on whether the application * accessing your cluster is running on the Internet or an Amazon EC2 instance, you can authorize inbound access to * either a Classless Interdomain Routing (CIDR)/Internet Protocol (IP) range or to an Amazon EC2 security group. * You can add as many as 20 ingress rules to an Amazon Redshift security group. *

*

* If you authorize access to an Amazon EC2 security group, specify EC2SecurityGroupName and * EC2SecurityGroupOwnerId. The Amazon EC2 security group and Amazon Redshift cluster must be in the same * Amazon Web Services Region. *

*

* If you authorize access to a CIDR/IP address range, specify CIDRIP. For an overview of CIDR blocks, see * the Wikipedia article on Classless * Inter-Domain Routing. *

*

* You must also associate the security group with a cluster so that clients running on these IP addresses or the * EC2 instance are authorized to connect to the cluster. For information about managing security groups, go to Working with Security * Groups in the Amazon Redshift Cluster Management Guide. *

* * @param authorizeClusterSecurityGroupIngressRequest * @return A Java Future containing the result of the AuthorizeClusterSecurityGroupIngress operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterSecurityGroupNotFoundException The cluster security group name does not refer to an existing * cluster security group.
  • *
  • InvalidClusterSecurityGroupStateException The state of the cluster security group is not * available.
  • *
  • AuthorizationAlreadyExistsException The specified CIDR block or EC2 security group is already * authorized for the specified cluster security group.
  • *
  • AuthorizationQuotaExceededException The authorization quota for the cluster security group has been * reached.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.AuthorizeClusterSecurityGroupIngress * @see AWS API Documentation */ @Override public CompletableFuture authorizeClusterSecurityGroupIngress( AuthorizeClusterSecurityGroupIngressRequest authorizeClusterSecurityGroupIngressRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(authorizeClusterSecurityGroupIngressRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, authorizeClusterSecurityGroupIngressRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AuthorizeClusterSecurityGroupIngress"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(AuthorizeClusterSecurityGroupIngressResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AuthorizeClusterSecurityGroupIngress").withProtocolMetadata(protocolMetadata) .withMarshaller(new AuthorizeClusterSecurityGroupIngressRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(authorizeClusterSecurityGroupIngressRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* From a data producer account, authorizes the sharing of a datashare with one or more consumer accounts or * managing entities. To authorize a datashare for a data consumer, the producer account must have the correct * access permissions. *

* * @param authorizeDataShareRequest * @return A Java Future containing the result of the AuthorizeDataShare operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidDataShareException There is an error with the datashare.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.AuthorizeDataShare * @see AWS * API Documentation */ @Override public CompletableFuture authorizeDataShare(AuthorizeDataShareRequest authorizeDataShareRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(authorizeDataShareRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, authorizeDataShareRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AuthorizeDataShare"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(AuthorizeDataShareResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AuthorizeDataShare").withProtocolMetadata(protocolMetadata) .withMarshaller(new AuthorizeDataShareRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(authorizeDataShareRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Grants access to a cluster. *

* * @param authorizeEndpointAccessRequest * @return A Java Future containing the result of the AuthorizeEndpointAccess operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • EndpointAuthorizationsPerClusterLimitExceededException The number of endpoint authorizations per * cluster has exceeded its limit.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • EndpointAuthorizationAlreadyExistsException The authorization already exists for this endpoint.
  • *
  • InvalidAuthorizationStateException The status of the authorization is not valid.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.AuthorizeEndpointAccess * @see AWS API Documentation */ @Override public CompletableFuture authorizeEndpointAccess( AuthorizeEndpointAccessRequest authorizeEndpointAccessRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(authorizeEndpointAccessRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, authorizeEndpointAccessRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AuthorizeEndpointAccess"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(AuthorizeEndpointAccessResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AuthorizeEndpointAccess").withProtocolMetadata(protocolMetadata) .withMarshaller(new AuthorizeEndpointAccessRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(authorizeEndpointAccessRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Authorizes the specified Amazon Web Services account to restore the specified snapshot. *

*

* For more information about working with snapshots, go to Amazon Redshift Snapshots * in the Amazon Redshift Cluster Management Guide. *

* * @param authorizeSnapshotAccessRequest * @return A Java Future containing the result of the AuthorizeSnapshotAccess operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterSnapshotNotFoundException The snapshot identifier does not refer to an existing cluster * snapshot.
  • *
  • AuthorizationAlreadyExistsException The specified CIDR block or EC2 security group is already * authorized for the specified cluster security group.
  • *
  • AuthorizationQuotaExceededException The authorization quota for the cluster security group has been * reached.
  • *
  • DependentServiceRequestThrottlingException The request cannot be completed because a dependent * service is throttling requests made by Amazon Redshift on your behalf. Wait and retry the request.
  • *
  • InvalidClusterSnapshotStateException The specified cluster snapshot is not in the * available state, or other accounts are authorized to access the snapshot.
  • *
  • LimitExceededException The encryption key has exceeded its grant limit in Amazon Web Services KMS.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.AuthorizeSnapshotAccess * @see AWS API Documentation */ @Override public CompletableFuture authorizeSnapshotAccess( AuthorizeSnapshotAccessRequest authorizeSnapshotAccessRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(authorizeSnapshotAccessRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, authorizeSnapshotAccessRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AuthorizeSnapshotAccess"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(AuthorizeSnapshotAccessResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AuthorizeSnapshotAccess").withProtocolMetadata(protocolMetadata) .withMarshaller(new AuthorizeSnapshotAccessRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(authorizeSnapshotAccessRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a set of cluster snapshots. *

* * @param batchDeleteClusterSnapshotsRequest * @return A Java Future containing the result of the BatchDeleteClusterSnapshots operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • BatchDeleteRequestSizeExceededException The maximum number for a batch delete of snapshots has been * reached. The limit is 100.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.BatchDeleteClusterSnapshots * @see AWS API Documentation */ @Override public CompletableFuture batchDeleteClusterSnapshots( BatchDeleteClusterSnapshotsRequest batchDeleteClusterSnapshotsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(batchDeleteClusterSnapshotsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, batchDeleteClusterSnapshotsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchDeleteClusterSnapshots"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(BatchDeleteClusterSnapshotsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("BatchDeleteClusterSnapshots").withProtocolMetadata(protocolMetadata) .withMarshaller(new BatchDeleteClusterSnapshotsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(batchDeleteClusterSnapshotsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies the settings for a set of cluster snapshots. *

* * @param batchModifyClusterSnapshotsRequest * @return A Java Future containing the result of the BatchModifyClusterSnapshots operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidRetentionPeriodException The retention period specified is either in the past or is not a * valid value.

    *

    * The value must be either -1 or an integer between 1 and 3,653.

  • *
  • BatchModifyClusterSnapshotsLimitExceededException The maximum number for snapshot identifiers has * been reached. The limit is 100.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.BatchModifyClusterSnapshots * @see AWS API Documentation */ @Override public CompletableFuture batchModifyClusterSnapshots( BatchModifyClusterSnapshotsRequest batchModifyClusterSnapshotsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(batchModifyClusterSnapshotsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, batchModifyClusterSnapshotsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchModifyClusterSnapshots"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(BatchModifyClusterSnapshotsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("BatchModifyClusterSnapshots").withProtocolMetadata(protocolMetadata) .withMarshaller(new BatchModifyClusterSnapshotsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(batchModifyClusterSnapshotsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Cancels a resize operation for a cluster. *

* * @param cancelResizeRequest * @return A Java Future containing the result of the CancelResize operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • ResizeNotFoundException A resize operation for the specified cluster is not found.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CancelResize * @see AWS API * Documentation */ @Override public CompletableFuture cancelResize(CancelResizeRequest cancelResizeRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(cancelResizeRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, cancelResizeRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CancelResize"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CancelResizeResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CancelResize").withProtocolMetadata(protocolMetadata) .withMarshaller(new CancelResizeRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(cancelResizeRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Copies the specified automated cluster snapshot to a new manual cluster snapshot. The source must be an automated * snapshot and it must be in the available state. *

*

* When you delete a cluster, Amazon Redshift deletes any automated snapshots of the cluster. Also, when the * retention period of the snapshot expires, Amazon Redshift automatically deletes it. If you want to keep an * automated snapshot for a longer period, you can make a manual copy of the snapshot. Manual snapshots are retained * until you delete them. *

*

* For more information about working with snapshots, go to Amazon Redshift Snapshots * in the Amazon Redshift Cluster Management Guide. *

* * @param copyClusterSnapshotRequest * @return A Java Future containing the result of the CopyClusterSnapshot operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • ClusterSnapshotAlreadyExistsException The value specified as a snapshot identifier is already used by * an existing snapshot.
  • *
  • ClusterSnapshotNotFoundException The snapshot identifier does not refer to an existing cluster * snapshot.
  • *
  • InvalidClusterSnapshotStateException The specified cluster snapshot is not in the * available state, or other accounts are authorized to access the snapshot.
  • *
  • ClusterSnapshotQuotaExceededException The request would result in the user exceeding the allowed * number of cluster snapshots.
  • *
  • InvalidRetentionPeriodException The retention period specified is either in the past or is not a * valid value.

    *

    * The value must be either -1 or an integer between 1 and 3,653.

  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CopyClusterSnapshot * @see AWS * API Documentation */ @Override public CompletableFuture copyClusterSnapshot( CopyClusterSnapshotRequest copyClusterSnapshotRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(copyClusterSnapshotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, copyClusterSnapshotRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CopyClusterSnapshot"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CopyClusterSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CopyClusterSnapshot").withProtocolMetadata(protocolMetadata) .withMarshaller(new CopyClusterSnapshotRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(copyClusterSnapshotRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates an authentication profile with the specified parameters. *

* * @param createAuthenticationProfileRequest * @return A Java Future containing the result of the CreateAuthenticationProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • AuthenticationProfileAlreadyExistsException The authentication profile already exists.
  • *
  • AuthenticationProfileQuotaExceededException The size or number of authentication profiles has * exceeded the quota. The maximum length of the JSON string and maximum number of authentication profiles * is determined by a quota for your account.
  • *
  • InvalidAuthenticationProfileRequestException The authentication profile request is not valid. The * profile name can't be null or empty. The authentication profile API operation must be available in the * Amazon Web Services Region.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CreateAuthenticationProfile * @see AWS API Documentation */ @Override public CompletableFuture createAuthenticationProfile( CreateAuthenticationProfileRequest createAuthenticationProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createAuthenticationProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createAuthenticationProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateAuthenticationProfile"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateAuthenticationProfileResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateAuthenticationProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateAuthenticationProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createAuthenticationProfileRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new cluster with the specified parameters. *

*

* To create a cluster in Virtual Private Cloud (VPC), you must provide a cluster subnet group name. The cluster * subnet group identifies the subnets of your VPC that Amazon Redshift uses when creating the cluster. For more * information about managing clusters, go to Amazon Redshift Clusters * in the Amazon Redshift Cluster Management Guide. *

* * @param createClusterRequest * @return A Java Future containing the result of the CreateCluster operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterAlreadyExistsException The account already has a cluster with the given identifier.
  • *
  • InsufficientClusterCapacityException The number of nodes specified exceeds the allotted capacity of * the cluster.
  • *
  • ClusterParameterGroupNotFoundException The parameter group name does not refer to an existing * parameter group.
  • *
  • ClusterSecurityGroupNotFoundException The cluster security group name does not refer to an existing * cluster security group.
  • *
  • ClusterQuotaExceededException The request would exceed the allowed number of cluster instances for * this account. For information about increasing your quota, go to Limits in Amazon * Redshift in the Amazon Redshift Cluster Management Guide.
  • *
  • NumberOfNodesQuotaExceededException The operation would exceed the number of nodes allotted to the * account. For information about increasing your quota, go to Limits in Amazon * Redshift in the Amazon Redshift Cluster Management Guide.
  • *
  • NumberOfNodesPerClusterLimitExceededException The operation would exceed the number of nodes allowed * for a cluster.
  • *
  • ClusterSubnetGroupNotFoundException The cluster subnet group name does not refer to an existing * cluster subnet group.
  • *
  • InvalidVpcNetworkStateException The cluster subnet group does not cover all Availability Zones.
  • *
  • InvalidClusterSubnetGroupStateException The cluster subnet group cannot be deleted because it is in * use.
  • *
  • InvalidSubnetException The requested subnet is not valid, or not all of the subnets are in the same * VPC.
  • *
  • UnauthorizedOperationException Your account is not authorized to perform the requested operation.
  • *
  • HsmClientCertificateNotFoundException There is no Amazon Redshift HSM client certificate with the * specified identifier.
  • *
  • HsmConfigurationNotFoundException There is no Amazon Redshift HSM configuration with the specified * identifier.
  • *
  • InvalidElasticIpException The Elastic IP (EIP) is invalid or cannot be found.
  • *
  • TagLimitExceededException You have exceeded the number of tags allowed.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • LimitExceededException The encryption key has exceeded its grant limit in Amazon Web Services KMS.
  • *
  • DependentServiceRequestThrottlingException The request cannot be completed because a dependent * service is throttling requests made by Amazon Redshift on your behalf. Wait and retry the request.
  • *
  • InvalidClusterTrackException The provided cluster track name is not valid.
  • *
  • SnapshotScheduleNotFoundException We could not find the specified snapshot schedule.
  • *
  • InvalidRetentionPeriodException The retention period specified is either in the past or is not a * valid value.

    *

    * The value must be either -1 or an integer between 1 and 3,653.

  • *
  • Ipv6CidrBlockNotFoundException There are no subnets in your VPC with associated IPv6 CIDR blocks. To * use dual-stack mode, associate an IPv6 CIDR block with each subnet in your VPC.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • RedshiftIdcApplicationNotExistsException The application you attempted to find doesn't exist.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CreateCluster * @see AWS API * Documentation */ @Override public CompletableFuture createCluster(CreateClusterRequest createClusterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createClusterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createClusterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateCluster"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateCluster").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateClusterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createClusterRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates an Amazon Redshift parameter group. *

*

* Creating parameter groups is independent of creating clusters. You can associate a cluster with a parameter group * when you create the cluster. You can also associate an existing cluster with a parameter group after the cluster * is created by using ModifyCluster. *

*

* Parameters in the parameter group define specific behavior that applies to the databases you create on the * cluster. For more information about parameters and parameter groups, go to Amazon Redshift * Parameter Groups in the Amazon Redshift Cluster Management Guide. *

* * @param createClusterParameterGroupRequest * @return A Java Future containing the result of the CreateClusterParameterGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterParameterGroupQuotaExceededException The request would result in the user exceeding the * allowed number of cluster parameter groups. For information about increasing your quota, go to Limits in Amazon * Redshift in the Amazon Redshift Cluster Management Guide.
  • *
  • ClusterParameterGroupAlreadyExistsException A cluster parameter group with the same name already * exists.
  • *
  • TagLimitExceededException You have exceeded the number of tags allowed.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CreateClusterParameterGroup * @see AWS API Documentation */ @Override public CompletableFuture createClusterParameterGroup( CreateClusterParameterGroupRequest createClusterParameterGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createClusterParameterGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createClusterParameterGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateClusterParameterGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateClusterParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateClusterParameterGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateClusterParameterGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createClusterParameterGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new Amazon Redshift security group. You use security groups to control access to non-VPC clusters. *

*

* For information about managing security groups, go to Amazon Redshift Cluster * Security Groups in the Amazon Redshift Cluster Management Guide. *

* * @param createClusterSecurityGroupRequest * @return A Java Future containing the result of the CreateClusterSecurityGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterSecurityGroupAlreadyExistsException A cluster security group with the same name already * exists.
  • *
  • ClusterSecurityGroupQuotaExceededException The request would result in the user exceeding the allowed * number of cluster security groups. For information about increasing your quota, go to Limits in Amazon * Redshift in the Amazon Redshift Cluster Management Guide.
  • *
  • TagLimitExceededException You have exceeded the number of tags allowed.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CreateClusterSecurityGroup * @see AWS API Documentation */ @Override public CompletableFuture createClusterSecurityGroup( CreateClusterSecurityGroupRequest createClusterSecurityGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createClusterSecurityGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createClusterSecurityGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateClusterSecurityGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateClusterSecurityGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateClusterSecurityGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateClusterSecurityGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createClusterSecurityGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a manual snapshot of the specified cluster. The cluster must be in the available state. *

*

* For more information about working with snapshots, go to Amazon Redshift Snapshots * in the Amazon Redshift Cluster Management Guide. *

* * @param createClusterSnapshotRequest * @return A Java Future containing the result of the CreateClusterSnapshot operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterSnapshotAlreadyExistsException The value specified as a snapshot identifier is already used by * an existing snapshot.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • ClusterSnapshotQuotaExceededException The request would result in the user exceeding the allowed * number of cluster snapshots.
  • *
  • TagLimitExceededException You have exceeded the number of tags allowed.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • InvalidRetentionPeriodException The retention period specified is either in the past or is not a * valid value.

    *

    * The value must be either -1 or an integer between 1 and 3,653.

  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CreateClusterSnapshot * @see AWS API Documentation */ @Override public CompletableFuture createClusterSnapshot( CreateClusterSnapshotRequest createClusterSnapshotRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createClusterSnapshotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createClusterSnapshotRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateClusterSnapshot"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateClusterSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateClusterSnapshot").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateClusterSnapshotRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createClusterSnapshotRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new Amazon Redshift subnet group. You must provide a list of one or more subnets in your existing * Amazon Virtual Private Cloud (Amazon VPC) when creating Amazon Redshift subnet group. *

*

* For information about subnet groups, go to Amazon Redshift * Cluster Subnet Groups in the Amazon Redshift Cluster Management Guide. *

* * @param createClusterSubnetGroupRequest * @return A Java Future containing the result of the CreateClusterSubnetGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterSubnetGroupAlreadyExistsException A ClusterSubnetGroupName is already used by an * existing cluster subnet group.
  • *
  • ClusterSubnetGroupQuotaExceededException The request would result in user exceeding the allowed * number of cluster subnet groups. For information about increasing your quota, go to Limits in Amazon * Redshift in the Amazon Redshift Cluster Management Guide.
  • *
  • ClusterSubnetQuotaExceededException The request would result in user exceeding the allowed number of * subnets in a cluster subnet groups. For information about increasing your quota, go to Limits in Amazon * Redshift in the Amazon Redshift Cluster Management Guide.
  • *
  • InvalidSubnetException The requested subnet is not valid, or not all of the subnets are in the same * VPC.
  • *
  • UnauthorizedOperationException Your account is not authorized to perform the requested operation.
  • *
  • TagLimitExceededException You have exceeded the number of tags allowed.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • DependentServiceRequestThrottlingException The request cannot be completed because a dependent * service is throttling requests made by Amazon Redshift on your behalf. Wait and retry the request.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CreateClusterSubnetGroup * @see AWS API Documentation */ @Override public CompletableFuture createClusterSubnetGroup( CreateClusterSubnetGroupRequest createClusterSubnetGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createClusterSubnetGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createClusterSubnetGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateClusterSubnetGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateClusterSubnetGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateClusterSubnetGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateClusterSubnetGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createClusterSubnetGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Used to create a custom domain name for a cluster. Properties include the custom domain name, the cluster the * custom domain is associated with, and the certificate Amazon Resource Name (ARN). *

* * @param createCustomDomainAssociationRequest * @return A Java Future containing the result of the CreateCustomDomainAssociation operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • CustomCnameAssociationException An error occurred when an attempt was made to change the custom * domain association.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CreateCustomDomainAssociation * @see AWS API Documentation */ @Override public CompletableFuture createCustomDomainAssociation( CreateCustomDomainAssociationRequest createCustomDomainAssociationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createCustomDomainAssociationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createCustomDomainAssociationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateCustomDomainAssociation"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateCustomDomainAssociationResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateCustomDomainAssociation").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateCustomDomainAssociationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createCustomDomainAssociationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a Redshift-managed VPC endpoint. *

* * @param createEndpointAccessRequest * @return A Java Future containing the result of the CreateEndpointAccess operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • AccessToClusterDeniedException You are not authorized to access the cluster.
  • *
  • EndpointsPerClusterLimitExceededException The number of Redshift-managed VPC endpoints per cluster * has exceeded its limit.
  • *
  • EndpointsPerAuthorizationLimitExceededException The number of Redshift-managed VPC endpoints per * authorization has exceeded its limit.
  • *
  • InvalidClusterSecurityGroupStateException The state of the cluster security group is not * available.
  • *
  • ClusterSubnetGroupNotFoundException The cluster subnet group name does not refer to an existing * cluster subnet group.
  • *
  • EndpointAlreadyExistsException The account already has a Redshift-managed VPC endpoint with the given * identifier.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • UnauthorizedOperationException Your account is not authorized to perform the requested operation.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CreateEndpointAccess * @see AWS * API Documentation */ @Override public CompletableFuture createEndpointAccess( CreateEndpointAccessRequest createEndpointAccessRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createEndpointAccessRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createEndpointAccessRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateEndpointAccess"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateEndpointAccessResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateEndpointAccess").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateEndpointAccessRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createEndpointAccessRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

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

*

* You can specify the source type, and lists of Amazon Redshift source IDs, event categories, and event severities. * Notifications will be sent for all events you want that match those criteria. For example, you can specify source * type = cluster, source ID = my-cluster-1 and mycluster2, event categories = Availability, Backup, and severity = * ERROR. The subscription will only send notifications for those ERROR events in the Availability and Backup * categories for the specified clusters. *

*

* If you specify both the source type and source IDs, such as source type = cluster and source identifier = * my-cluster-1, notifications will be sent for all the cluster events for my-cluster-1. If you specify a source * type but do not specify a source identifier, you will receive notice of the events for the objects of that type * in your Amazon Web Services account. If you do not specify either the SourceType nor the SourceIdentifier, you * will be notified of events generated from all Amazon Redshift sources belonging to your Amazon Web Services * account. You must specify a source type if you specify a source ID. *

* * @param createEventSubscriptionRequest * @return A Java Future containing the result of the CreateEventSubscription operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • EventSubscriptionQuotaExceededException The request would exceed the allowed number of event * subscriptions for this account. For information about increasing your quota, go to Limits in Amazon * Redshift in the Amazon Redshift Cluster Management Guide.
  • *
  • SubscriptionAlreadyExistException There is already an existing event notification subscription with * the specified name.
  • *
  • SnsInvalidTopicException Amazon SNS has responded that there is a problem with the specified Amazon * SNS topic.
  • *
  • SnsNoAuthorizationException You do not have permission to publish to the specified Amazon SNS topic.
  • *
  • SnsTopicArnNotFoundException An Amazon SNS topic with the specified Amazon Resource Name (ARN) does * not exist.
  • *
  • SubscriptionEventIdNotFoundException An Amazon Redshift event with the specified event ID does not * exist.
  • *
  • SubscriptionCategoryNotFoundException The value specified for the event category was not one of the * allowed values, or it specified a category that does not apply to the specified source type. The allowed * values are Configuration, Management, Monitoring, and Security.
  • *
  • SubscriptionSeverityNotFoundException The value specified for the event severity was not one of the * allowed values, or it specified a severity that does not apply to the specified source type. The allowed * values are ERROR and INFO.
  • *
  • SourceNotFoundException The specified Amazon Redshift event source could not be found.
  • *
  • TagLimitExceededException You have exceeded the number of tags allowed.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CreateEventSubscription * @see AWS API Documentation */ @Override public CompletableFuture createEventSubscription( CreateEventSubscriptionRequest createEventSubscriptionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createEventSubscriptionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createEventSubscriptionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateEventSubscription"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateEventSubscriptionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateEventSubscription").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateEventSubscriptionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createEventSubscriptionRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates an HSM client certificate that an Amazon Redshift cluster will use to connect to the client's HSM in * order to store and retrieve the keys used to encrypt the cluster databases. *

*

* The command returns a public key, which you must store in the HSM. In addition to creating the HSM certificate, * you must create an Amazon Redshift HSM configuration that provides a cluster the information needed to store and * use encryption keys in the HSM. For more information, go to Hardware * Security Modules in the Amazon Redshift Cluster Management Guide. *

* * @param createHsmClientCertificateRequest * @return A Java Future containing the result of the CreateHsmClientCertificate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • HsmClientCertificateAlreadyExistsException There is already an existing Amazon Redshift HSM client * certificate with the specified identifier.
  • *
  • HsmClientCertificateQuotaExceededException The quota for HSM client certificates has been reached. * For information about increasing your quota, go to Limits in Amazon * Redshift in the Amazon Redshift Cluster Management Guide.
  • *
  • TagLimitExceededException You have exceeded the number of tags allowed.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CreateHsmClientCertificate * @see AWS API Documentation */ @Override public CompletableFuture createHsmClientCertificate( CreateHsmClientCertificateRequest createHsmClientCertificateRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createHsmClientCertificateRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createHsmClientCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateHsmClientCertificate"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateHsmClientCertificateResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateHsmClientCertificate").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateHsmClientCertificateRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createHsmClientCertificateRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates an HSM configuration that contains the information required by an Amazon Redshift cluster to store and * use database encryption keys in a Hardware Security Module (HSM). After creating the HSM configuration, you can * specify it as a parameter when creating a cluster. The cluster will then store its encryption keys in the HSM. *

*

* In addition to creating an HSM configuration, you must also create an HSM client certificate. For more * information, go to Hardware * Security Modules in the Amazon Redshift Cluster Management Guide. *

* * @param createHsmConfigurationRequest * @return A Java Future containing the result of the CreateHsmConfiguration operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • HsmConfigurationAlreadyExistsException There is already an existing Amazon Redshift HSM configuration * with the specified identifier.
  • *
  • HsmConfigurationQuotaExceededException The quota for HSM configurations has been reached. For * information about increasing your quota, go to Limits in Amazon * Redshift in the Amazon Redshift Cluster Management Guide.
  • *
  • TagLimitExceededException You have exceeded the number of tags allowed.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CreateHsmConfiguration * @see AWS API Documentation */ @Override public CompletableFuture createHsmConfiguration( CreateHsmConfigurationRequest createHsmConfigurationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createHsmConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createHsmConfigurationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateHsmConfiguration"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateHsmConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateHsmConfiguration").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateHsmConfigurationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createHsmConfigurationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates an Amazon Redshift application for use with IAM Identity Center. *

* * @param createRedshiftIdcApplicationRequest * @return A Java Future containing the result of the CreateRedshiftIdcApplication operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • RedshiftIdcApplicationAlreadyExistsException The application you attempted to add already exists.
  • *
  • DependentServiceUnavailableException Your request cannot be completed because a dependent internal * service is temporarily unavailable. Wait 30 to 60 seconds and try again.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • DependentServiceAccessDeniedException A dependent service denied access for the integration.
  • *
  • RedshiftIdcApplicationQuotaExceededException The maximum number of Redshift IAM Identity Center * applications was exceeded.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CreateRedshiftIdcApplication * @see AWS API Documentation */ @Override public CompletableFuture createRedshiftIdcApplication( CreateRedshiftIdcApplicationRequest createRedshiftIdcApplicationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createRedshiftIdcApplicationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createRedshiftIdcApplicationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateRedshiftIdcApplication"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateRedshiftIdcApplicationResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateRedshiftIdcApplication").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateRedshiftIdcApplicationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createRedshiftIdcApplicationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a scheduled action. A scheduled action contains a schedule and an Amazon Redshift API action. For * example, you can create a schedule of when to run the ResizeCluster API operation. *

* * @param createScheduledActionRequest * @return A Java Future containing the result of the CreateScheduledAction operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • ScheduledActionAlreadyExistsException The scheduled action already exists.
  • *
  • ScheduledActionQuotaExceededException The quota for scheduled actions exceeded.
  • *
  • ScheduledActionTypeUnsupportedException The action type specified for a scheduled action is not * supported.
  • *
  • InvalidScheduleException The schedule you submitted isn't valid.
  • *
  • InvalidScheduledActionException The scheduled action is not valid.
  • *
  • UnauthorizedOperationException Your account is not authorized to perform the requested operation.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CreateScheduledAction * @see AWS API Documentation */ @Override public CompletableFuture createScheduledAction( CreateScheduledActionRequest createScheduledActionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createScheduledActionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createScheduledActionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateScheduledAction"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateScheduledActionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateScheduledAction").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateScheduledActionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createScheduledActionRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a snapshot copy grant that permits Amazon Redshift to use an encrypted symmetric key from Key Management * Service (KMS) to encrypt copied snapshots in a destination region. *

*

* For more information about managing snapshot copy grants, go to Amazon Redshift Database * Encryption in the Amazon Redshift Cluster Management Guide. *

* * @param createSnapshotCopyGrantRequest * The result of the CreateSnapshotCopyGrant action. * @return A Java Future containing the result of the CreateSnapshotCopyGrant operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • SnapshotCopyGrantAlreadyExistsException The snapshot copy grant can't be created because a grant with * the same name already exists.
  • *
  • SnapshotCopyGrantQuotaExceededException The Amazon Web Services account has exceeded the maximum * number of snapshot copy grants in this region.
  • *
  • LimitExceededException The encryption key has exceeded its grant limit in Amazon Web Services KMS.
  • *
  • TagLimitExceededException You have exceeded the number of tags allowed.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • DependentServiceRequestThrottlingException The request cannot be completed because a dependent * service is throttling requests made by Amazon Redshift on your behalf. Wait and retry the request.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CreateSnapshotCopyGrant * @see AWS API Documentation */ @Override public CompletableFuture createSnapshotCopyGrant( CreateSnapshotCopyGrantRequest createSnapshotCopyGrantRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createSnapshotCopyGrantRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createSnapshotCopyGrantRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateSnapshotCopyGrant"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateSnapshotCopyGrantResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateSnapshotCopyGrant").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateSnapshotCopyGrantRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createSnapshotCopyGrantRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Create a snapshot schedule that can be associated to a cluster and which overrides the default system backup * schedule. *

* * @param createSnapshotScheduleRequest * @return A Java Future containing the result of the CreateSnapshotSchedule operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • SnapshotScheduleAlreadyExistsException The specified snapshot schedule already exists.
  • *
  • InvalidScheduleException The schedule you submitted isn't valid.
  • *
  • SnapshotScheduleQuotaExceededException You have exceeded the quota of snapshot schedules.
  • *
  • TagLimitExceededException You have exceeded the number of tags allowed.
  • *
  • ScheduleDefinitionTypeUnsupportedException The definition you submitted is not supported.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CreateSnapshotSchedule * @see AWS API Documentation */ @Override public CompletableFuture createSnapshotSchedule( CreateSnapshotScheduleRequest createSnapshotScheduleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createSnapshotScheduleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createSnapshotScheduleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateSnapshotSchedule"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateSnapshotScheduleResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateSnapshotSchedule").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateSnapshotScheduleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createSnapshotScheduleRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds tags to a cluster. *

*

* A resource can have up to 50 tags. If you try to create more than 50 tags for a resource, you will receive an * error and the attempt will fail. *

*

* If you specify a key that already exists for the resource, the value for that key will be updated with the new * value. *

* * @param createTagsRequest * Contains the output from the CreateTags action. * @return A Java Future containing the result of the CreateTags operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • TagLimitExceededException You have exceeded the number of tags allowed.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CreateTags * @see AWS API * Documentation */ @Override public CompletableFuture createTags(CreateTagsRequest createTagsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createTagsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createTagsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateTags"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateTagsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("CreateTags") .withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateTagsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createTagsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a usage limit for a specified Amazon Redshift feature on a cluster. The usage limit is identified by the * returned usage limit identifier. *

* * @param createUsageLimitRequest * @return A Java Future containing the result of the CreateUsageLimit operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • LimitExceededException The encryption key has exceeded its grant limit in Amazon Web Services KMS.
  • *
  • UsageLimitAlreadyExistsException The usage limit already exists.
  • *
  • InvalidUsageLimitException The usage limit is not valid.
  • *
  • TagLimitExceededException You have exceeded the number of tags allowed.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.CreateUsageLimit * @see AWS API * Documentation */ @Override public CompletableFuture createUsageLimit(CreateUsageLimitRequest createUsageLimitRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createUsageLimitRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createUsageLimitRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateUsageLimit"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(CreateUsageLimitResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateUsageLimit").withProtocolMetadata(protocolMetadata) .withMarshaller(new CreateUsageLimitRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(createUsageLimitRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* From a datashare producer account, removes authorization from the specified datashare. *

* * @param deauthorizeDataShareRequest * @return A Java Future containing the result of the DeauthorizeDataShare operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidDataShareException There is an error with the datashare.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeauthorizeDataShare * @see AWS * API Documentation */ @Override public CompletableFuture deauthorizeDataShare( DeauthorizeDataShareRequest deauthorizeDataShareRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deauthorizeDataShareRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deauthorizeDataShareRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeauthorizeDataShare"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeauthorizeDataShareResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeauthorizeDataShare").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeauthorizeDataShareRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deauthorizeDataShareRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes an authentication profile. *

* * @param deleteAuthenticationProfileRequest * @return A Java Future containing the result of the DeleteAuthenticationProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • AuthenticationProfileNotFoundException The authentication profile can't be found.
  • *
  • InvalidAuthenticationProfileRequestException The authentication profile request is not valid. The * profile name can't be null or empty. The authentication profile API operation must be available in the * Amazon Web Services Region.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteAuthenticationProfile * @see AWS API Documentation */ @Override public CompletableFuture deleteAuthenticationProfile( DeleteAuthenticationProfileRequest deleteAuthenticationProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAuthenticationProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAuthenticationProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAuthenticationProfile"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteAuthenticationProfileResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteAuthenticationProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteAuthenticationProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteAuthenticationProfileRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a previously provisioned cluster without its final snapshot being created. A successful response from the * web service indicates that the request was received correctly. Use DescribeClusters to monitor the status * of the deletion. The delete operation cannot be canceled or reverted once submitted. For more information about * managing clusters, go to Amazon Redshift Clusters * in the Amazon Redshift Cluster Management Guide. *

*

* If you want to shut down the cluster and retain it for future use, set SkipFinalClusterSnapshot to * false and specify a name for FinalClusterSnapshotIdentifier. You can later restore this * snapshot to resume using the cluster. If a final cluster snapshot is requested, the status of the cluster will be * "final-snapshot" while the snapshot is being taken, then it's "deleting" once Amazon Redshift begins deleting the * cluster. *

*

* For more information about managing clusters, go to Amazon Redshift Clusters * in the Amazon Redshift Cluster Management Guide. *

* * @param deleteClusterRequest * @return A Java Future containing the result of the DeleteCluster operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • ClusterSnapshotAlreadyExistsException The value specified as a snapshot identifier is already used by * an existing snapshot.
  • *
  • ClusterSnapshotQuotaExceededException The request would result in the user exceeding the allowed * number of cluster snapshots.
  • *
  • InvalidRetentionPeriodException The retention period specified is either in the past or is not a * valid value.

    *

    * The value must be either -1 or an integer between 1 and 3,653.

  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteCluster * @see AWS API * Documentation */ @Override public CompletableFuture deleteCluster(DeleteClusterRequest deleteClusterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteClusterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteClusterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteCluster"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteCluster").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteClusterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteClusterRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a specified Amazon Redshift parameter group. *

* *

* You cannot delete a parameter group if it is associated with a cluster. *

*
* * @param deleteClusterParameterGroupRequest * @return A Java Future containing the result of the DeleteClusterParameterGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidClusterParameterGroupStateException The cluster parameter group action can not be completed * because another task is in progress that involves the parameter group. Wait a few moments and try the * operation again.
  • *
  • ClusterParameterGroupNotFoundException The parameter group name does not refer to an existing * parameter group.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteClusterParameterGroup * @see AWS API Documentation */ @Override public CompletableFuture deleteClusterParameterGroup( DeleteClusterParameterGroupRequest deleteClusterParameterGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteClusterParameterGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteClusterParameterGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteClusterParameterGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteClusterParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteClusterParameterGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteClusterParameterGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteClusterParameterGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes an Amazon Redshift security group. *

* *

* You cannot delete a security group that is associated with any clusters. You cannot delete the default security * group. *

*
*

* For information about managing security groups, go to Amazon Redshift Cluster * Security Groups in the Amazon Redshift Cluster Management Guide. *

* * @param deleteClusterSecurityGroupRequest * @return A Java Future containing the result of the DeleteClusterSecurityGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidClusterSecurityGroupStateException The state of the cluster security group is not * available.
  • *
  • ClusterSecurityGroupNotFoundException The cluster security group name does not refer to an existing * cluster security group.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteClusterSecurityGroup * @see AWS API Documentation */ @Override public CompletableFuture deleteClusterSecurityGroup( DeleteClusterSecurityGroupRequest deleteClusterSecurityGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteClusterSecurityGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteClusterSecurityGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteClusterSecurityGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteClusterSecurityGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteClusterSecurityGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteClusterSecurityGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteClusterSecurityGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified manual snapshot. The snapshot must be in the available state, with no other * users authorized to access the snapshot. *

*

* Unlike automated snapshots, manual snapshots are retained even after you delete your cluster. Amazon Redshift * does not delete your manual snapshots. You must delete manual snapshot explicitly to avoid getting charged. If * other accounts are authorized to access the snapshot, you must revoke all of the authorizations before you can * delete the snapshot. *

* * @param deleteClusterSnapshotRequest * @return A Java Future containing the result of the DeleteClusterSnapshot operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidClusterSnapshotStateException The specified cluster snapshot is not in the * available state, or other accounts are authorized to access the snapshot.
  • *
  • ClusterSnapshotNotFoundException The snapshot identifier does not refer to an existing cluster * snapshot.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteClusterSnapshot * @see AWS API Documentation */ @Override public CompletableFuture deleteClusterSnapshot( DeleteClusterSnapshotRequest deleteClusterSnapshotRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteClusterSnapshotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteClusterSnapshotRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteClusterSnapshot"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteClusterSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteClusterSnapshot").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteClusterSnapshotRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteClusterSnapshotRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified cluster subnet group. *

* * @param deleteClusterSubnetGroupRequest * @return A Java Future containing the result of the DeleteClusterSubnetGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidClusterSubnetGroupStateException The cluster subnet group cannot be deleted because it is in * use.
  • *
  • InvalidClusterSubnetStateException The state of the subnet is invalid.
  • *
  • ClusterSubnetGroupNotFoundException The cluster subnet group name does not refer to an existing * cluster subnet group.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteClusterSubnetGroup * @see AWS API Documentation */ @Override public CompletableFuture deleteClusterSubnetGroup( DeleteClusterSubnetGroupRequest deleteClusterSubnetGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteClusterSubnetGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteClusterSubnetGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteClusterSubnetGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteClusterSubnetGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteClusterSubnetGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteClusterSubnetGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteClusterSubnetGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Contains information about deleting a custom domain association for a cluster. *

* * @param deleteCustomDomainAssociationRequest * @return A Java Future containing the result of the DeleteCustomDomainAssociation operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • CustomCnameAssociationException An error occurred when an attempt was made to change the custom * domain association.
  • *
  • CustomDomainAssociationNotFoundException An error occurred. The custom domain name couldn't be found. *
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteCustomDomainAssociation * @see AWS API Documentation */ @Override public CompletableFuture deleteCustomDomainAssociation( DeleteCustomDomainAssociationRequest deleteCustomDomainAssociationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteCustomDomainAssociationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteCustomDomainAssociationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteCustomDomainAssociation"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteCustomDomainAssociationResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteCustomDomainAssociation").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteCustomDomainAssociationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteCustomDomainAssociationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a Redshift-managed VPC endpoint. *

* * @param deleteEndpointAccessRequest * @return A Java Future containing the result of the DeleteEndpointAccess operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • InvalidEndpointStateException The status of the endpoint is not valid.
  • *
  • InvalidClusterSecurityGroupStateException The state of the cluster security group is not * available.
  • *
  • EndpointNotFoundException The endpoint name doesn't refer to an existing endpoint.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteEndpointAccess * @see AWS * API Documentation */ @Override public CompletableFuture deleteEndpointAccess( DeleteEndpointAccessRequest deleteEndpointAccessRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteEndpointAccessRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteEndpointAccessRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteEndpointAccess"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteEndpointAccessResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteEndpointAccess").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteEndpointAccessRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteEndpointAccessRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes an Amazon Redshift event notification subscription. *

* * @param deleteEventSubscriptionRequest * @return A Java Future containing the result of the DeleteEventSubscription operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • SubscriptionNotFoundException An Amazon Redshift event notification subscription with the specified * name does not exist.
  • *
  • InvalidSubscriptionStateException The subscription request is invalid because it is a duplicate * request. This subscription request is already in progress.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteEventSubscription * @see AWS API Documentation */ @Override public CompletableFuture deleteEventSubscription( DeleteEventSubscriptionRequest deleteEventSubscriptionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteEventSubscriptionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteEventSubscriptionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteEventSubscription"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteEventSubscriptionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteEventSubscription").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteEventSubscriptionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteEventSubscriptionRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified HSM client certificate. *

* * @param deleteHsmClientCertificateRequest * @return A Java Future containing the result of the DeleteHsmClientCertificate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidHsmClientCertificateStateException The specified HSM client certificate is not in the * available state, or it is still in use by one or more Amazon Redshift clusters.
  • *
  • HsmClientCertificateNotFoundException There is no Amazon Redshift HSM client certificate with the * specified identifier.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteHsmClientCertificate * @see AWS API Documentation */ @Override public CompletableFuture deleteHsmClientCertificate( DeleteHsmClientCertificateRequest deleteHsmClientCertificateRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteHsmClientCertificateRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteHsmClientCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteHsmClientCertificate"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteHsmClientCertificateResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteHsmClientCertificate").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteHsmClientCertificateRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteHsmClientCertificateRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified Amazon Redshift HSM configuration. *

* * @param deleteHsmConfigurationRequest * @return A Java Future containing the result of the DeleteHsmConfiguration operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidHsmConfigurationStateException The specified HSM configuration is not in the * available state, or it is still in use by one or more Amazon Redshift clusters.
  • *
  • HsmConfigurationNotFoundException There is no Amazon Redshift HSM configuration with the specified * identifier.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteHsmConfiguration * @see AWS API Documentation */ @Override public CompletableFuture deleteHsmConfiguration( DeleteHsmConfigurationRequest deleteHsmConfigurationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteHsmConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteHsmConfigurationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteHsmConfiguration"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteHsmConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteHsmConfiguration").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteHsmConfigurationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteHsmConfigurationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a partner integration from a cluster. Data can still flow to the cluster until the integration is deleted * at the partner's website. *

* * @param deletePartnerRequest * @return A Java Future containing the result of the DeletePartner operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • PartnerNotFoundException The name of the partner was not found.
  • *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • UnauthorizedPartnerIntegrationException The partner integration is not authorized.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeletePartner * @see AWS API * Documentation */ @Override public CompletableFuture deletePartner(DeletePartnerRequest deletePartnerRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deletePartnerRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deletePartnerRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeletePartner"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeletePartnerResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeletePartner").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeletePartnerRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deletePartnerRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes an Amazon Redshift IAM Identity Center application. *

* * @param deleteRedshiftIdcApplicationRequest * @return A Java Future containing the result of the DeleteRedshiftIdcApplication operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • RedshiftIdcApplicationNotExistsException The application you attempted to find doesn't exist.
  • *
  • DependentServiceUnavailableException Your request cannot be completed because a dependent internal * service is temporarily unavailable. Wait 30 to 60 seconds and try again.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • DependentServiceAccessDeniedException A dependent service denied access for the integration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteRedshiftIdcApplication * @see AWS API Documentation */ @Override public CompletableFuture deleteRedshiftIdcApplication( DeleteRedshiftIdcApplicationRequest deleteRedshiftIdcApplicationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteRedshiftIdcApplicationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteRedshiftIdcApplicationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteRedshiftIdcApplication"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteRedshiftIdcApplicationResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteRedshiftIdcApplication").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteRedshiftIdcApplicationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteRedshiftIdcApplicationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the resource policy for a specified resource. *

* * @param deleteResourcePolicyRequest * @return A Java Future containing the result of the DeleteResourcePolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteResourcePolicy * @see AWS * API Documentation */ @Override public CompletableFuture deleteResourcePolicy( DeleteResourcePolicyRequest deleteResourcePolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteResourcePolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteResourcePolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteResourcePolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteResourcePolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteResourcePolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteResourcePolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteResourcePolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a scheduled action. *

* * @param deleteScheduledActionRequest * @return A Java Future containing the result of the DeleteScheduledAction operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ScheduledActionNotFoundException The scheduled action cannot be found.
  • *
  • UnauthorizedOperationException Your account is not authorized to perform the requested operation.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteScheduledAction * @see AWS API Documentation */ @Override public CompletableFuture deleteScheduledAction( DeleteScheduledActionRequest deleteScheduledActionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteScheduledActionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteScheduledActionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteScheduledAction"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteScheduledActionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteScheduledAction").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteScheduledActionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteScheduledActionRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified snapshot copy grant. *

* * @param deleteSnapshotCopyGrantRequest * The result of the DeleteSnapshotCopyGrant action. * @return A Java Future containing the result of the DeleteSnapshotCopyGrant operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidSnapshotCopyGrantStateException The snapshot copy grant can't be deleted because it is used by * one or more clusters.
  • *
  • SnapshotCopyGrantNotFoundException The specified snapshot copy grant can't be found. Make sure that * the name is typed correctly and that the grant exists in the destination region.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteSnapshotCopyGrant * @see AWS API Documentation */ @Override public CompletableFuture deleteSnapshotCopyGrant( DeleteSnapshotCopyGrantRequest deleteSnapshotCopyGrantRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteSnapshotCopyGrantRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSnapshotCopyGrantRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSnapshotCopyGrant"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteSnapshotCopyGrantResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteSnapshotCopyGrant").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteSnapshotCopyGrantRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteSnapshotCopyGrantRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a snapshot schedule. *

* * @param deleteSnapshotScheduleRequest * @return A Java Future containing the result of the DeleteSnapshotSchedule operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidClusterSnapshotScheduleStateException The cluster snapshot schedule state is not valid.
  • *
  • SnapshotScheduleNotFoundException We could not find the specified snapshot schedule.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteSnapshotSchedule * @see AWS API Documentation */ @Override public CompletableFuture deleteSnapshotSchedule( DeleteSnapshotScheduleRequest deleteSnapshotScheduleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteSnapshotScheduleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSnapshotScheduleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSnapshotSchedule"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteSnapshotScheduleResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteSnapshotSchedule").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteSnapshotScheduleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteSnapshotScheduleRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes tags from a resource. You must provide the ARN of the resource from which you want to delete the tag or * tags. *

* * @param deleteTagsRequest * Contains the output from the DeleteTags action. * @return A Java Future containing the result of the DeleteTags operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteTags * @see AWS API * Documentation */ @Override public CompletableFuture deleteTags(DeleteTagsRequest deleteTagsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteTagsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteTagsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteTags"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteTagsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("DeleteTags") .withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteTagsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteTagsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a usage limit from a cluster. *

* * @param deleteUsageLimitRequest * @return A Java Future containing the result of the DeleteUsageLimit operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • UsageLimitNotFoundException The usage limit identifier can't be found.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DeleteUsageLimit * @see AWS API * Documentation */ @Override public CompletableFuture deleteUsageLimit(DeleteUsageLimitRequest deleteUsageLimitRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteUsageLimitRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteUsageLimitRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteUsageLimit"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DeleteUsageLimitResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteUsageLimit").withProtocolMetadata(protocolMetadata) .withMarshaller(new DeleteUsageLimitRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(deleteUsageLimitRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of attributes attached to an account *

* * @param describeAccountAttributesRequest * @return A Java Future containing the result of the DescribeAccountAttributes operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeAccountAttributes * @see AWS API Documentation */ @Override public CompletableFuture describeAccountAttributes( DescribeAccountAttributesRequest describeAccountAttributesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeAccountAttributesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeAccountAttributesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeAccountAttributes"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeAccountAttributesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeAccountAttributes").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeAccountAttributesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeAccountAttributesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Describes an authentication profile. *

* * @param describeAuthenticationProfilesRequest * @return A Java Future containing the result of the DescribeAuthenticationProfiles operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • AuthenticationProfileNotFoundException The authentication profile can't be found.
  • *
  • InvalidAuthenticationProfileRequestException The authentication profile request is not valid. The * profile name can't be null or empty. The authentication profile API operation must be available in the * Amazon Web Services Region.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeAuthenticationProfiles * @see AWS API Documentation */ @Override public CompletableFuture describeAuthenticationProfiles( DescribeAuthenticationProfilesRequest describeAuthenticationProfilesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeAuthenticationProfilesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeAuthenticationProfilesRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeAuthenticationProfiles"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeAuthenticationProfilesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeAuthenticationProfiles").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeAuthenticationProfilesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeAuthenticationProfilesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns an array of ClusterDbRevision objects. *

* * @param describeClusterDbRevisionsRequest * @return A Java Future containing the result of the DescribeClusterDbRevisions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeClusterDbRevisions * @see AWS API Documentation */ @Override public CompletableFuture describeClusterDbRevisions( DescribeClusterDbRevisionsRequest describeClusterDbRevisionsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeClusterDbRevisionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeClusterDbRevisionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeClusterDbRevisions"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeClusterDbRevisionsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeClusterDbRevisions").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeClusterDbRevisionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeClusterDbRevisionsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of Amazon Redshift parameter groups, including parameter groups you created and the default * parameter group. For each parameter group, the response includes the parameter group name, description, and * parameter group family name. You can optionally specify a name to retrieve the description of a specific * parameter group. *

*

* For more information about parameters and parameter groups, go to Amazon Redshift * Parameter Groups in the Amazon Redshift Cluster Management Guide. *

*

* If you specify both tag keys and tag values in the same request, Amazon Redshift returns all parameter groups * that match any combination of the specified keys and values. For example, if you have owner and * environment for tag keys, and admin and test for tag values, all parameter * groups that have any combination of those values are returned. *

*

* If both tag keys and values are omitted from the request, parameter groups are returned regardless of whether * they have tag keys or values associated with them. *

* * @param describeClusterParameterGroupsRequest * @return A Java Future containing the result of the DescribeClusterParameterGroups operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterParameterGroupNotFoundException The parameter group name does not refer to an existing * parameter group.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeClusterParameterGroups * @see AWS API Documentation */ @Override public CompletableFuture describeClusterParameterGroups( DescribeClusterParameterGroupsRequest describeClusterParameterGroupsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeClusterParameterGroupsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeClusterParameterGroupsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeClusterParameterGroups"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeClusterParameterGroupsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeClusterParameterGroups").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeClusterParameterGroupsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeClusterParameterGroupsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a detailed list of parameters contained within the specified Amazon Redshift parameter group. For each * parameter the response includes information such as parameter name, description, data type, value, whether the * parameter value is modifiable, and so on. *

*

* You can specify source filter to retrieve parameters of only specific type. For example, to retrieve * parameters that were modified by a user action such as from ModifyClusterParameterGroup, you can specify * source equal to user. *

*

* For more information about parameters and parameter groups, go to Amazon Redshift * Parameter Groups in the Amazon Redshift Cluster Management Guide. *

* * @param describeClusterParametersRequest * @return A Java Future containing the result of the DescribeClusterParameters operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterParameterGroupNotFoundException The parameter group name does not refer to an existing * parameter group.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeClusterParameters * @see AWS API Documentation */ @Override public CompletableFuture describeClusterParameters( DescribeClusterParametersRequest describeClusterParametersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeClusterParametersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeClusterParametersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeClusterParameters"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeClusterParametersResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeClusterParameters").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeClusterParametersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeClusterParametersRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about Amazon Redshift security groups. If the name of a security group is specified, the * response will contain only information about only that security group. *

*

* For information about managing security groups, go to Amazon Redshift Cluster * Security Groups in the Amazon Redshift Cluster Management Guide. *

*

* If you specify both tag keys and tag values in the same request, Amazon Redshift returns all security groups that * match any combination of the specified keys and values. For example, if you have owner and * environment for tag keys, and admin and test for tag values, all security * groups that have any combination of those values are returned. *

*

* If both tag keys and values are omitted from the request, security groups are returned regardless of whether they * have tag keys or values associated with them. *

* * @param describeClusterSecurityGroupsRequest * @return A Java Future containing the result of the DescribeClusterSecurityGroups operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterSecurityGroupNotFoundException The cluster security group name does not refer to an existing * cluster security group.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeClusterSecurityGroups * @see AWS API Documentation */ @Override public CompletableFuture describeClusterSecurityGroups( DescribeClusterSecurityGroupsRequest describeClusterSecurityGroupsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeClusterSecurityGroupsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeClusterSecurityGroupsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeClusterSecurityGroups"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeClusterSecurityGroupsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeClusterSecurityGroups").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeClusterSecurityGroupsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeClusterSecurityGroupsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns one or more snapshot objects, which contain metadata about your cluster snapshots. By default, this * operation returns information about all snapshots of all clusters that are owned by your Amazon Web Services * account. No information is returned for snapshots owned by inactive Amazon Web Services accounts. *

*

* If you specify both tag keys and tag values in the same request, Amazon Redshift returns all snapshots that match * any combination of the specified keys and values. For example, if you have owner and * environment for tag keys, and admin and test for tag values, all snapshots * that have any combination of those values are returned. Only snapshots that you own are returned in the response; * shared snapshots are not returned with the tag key and tag value request parameters. *

*

* If both tag keys and values are omitted from the request, snapshots are returned regardless of whether they have * tag keys or values associated with them. *

* * @param describeClusterSnapshotsRequest * @return A Java Future containing the result of the DescribeClusterSnapshots operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • ClusterSnapshotNotFoundException The snapshot identifier does not refer to an existing cluster * snapshot.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeClusterSnapshots * @see AWS API Documentation */ @Override public CompletableFuture describeClusterSnapshots( DescribeClusterSnapshotsRequest describeClusterSnapshotsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeClusterSnapshotsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeClusterSnapshotsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeClusterSnapshots"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeClusterSnapshotsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeClusterSnapshots").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeClusterSnapshotsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeClusterSnapshotsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns one or more cluster subnet group objects, which contain metadata about your cluster subnet groups. By * default, this operation returns information about all cluster subnet groups that are defined in your Amazon Web * Services account. *

*

* If you specify both tag keys and tag values in the same request, Amazon Redshift returns all subnet groups that * match any combination of the specified keys and values. For example, if you have owner and * environment for tag keys, and admin and test for tag values, all subnet * groups that have any combination of those values are returned. *

*

* If both tag keys and values are omitted from the request, subnet groups are returned regardless of whether they * have tag keys or values associated with them. *

* * @param describeClusterSubnetGroupsRequest * @return A Java Future containing the result of the DescribeClusterSubnetGroups operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterSubnetGroupNotFoundException The cluster subnet group name does not refer to an existing * cluster subnet group.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeClusterSubnetGroups * @see AWS API Documentation */ @Override public CompletableFuture describeClusterSubnetGroups( DescribeClusterSubnetGroupsRequest describeClusterSubnetGroupsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeClusterSubnetGroupsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeClusterSubnetGroupsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeClusterSubnetGroups"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeClusterSubnetGroupsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeClusterSubnetGroups").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeClusterSubnetGroupsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeClusterSubnetGroupsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of all the available maintenance tracks. *

* * @param describeClusterTracksRequest * @return A Java Future containing the result of the DescribeClusterTracks operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidClusterTrackException The provided cluster track name is not valid.
  • *
  • UnauthorizedOperationException Your account is not authorized to perform the requested operation.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeClusterTracks * @see AWS API Documentation */ @Override public CompletableFuture describeClusterTracks( DescribeClusterTracksRequest describeClusterTracksRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeClusterTracksRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeClusterTracksRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeClusterTracks"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeClusterTracksResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeClusterTracks").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeClusterTracksRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeClusterTracksRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns descriptions of the available Amazon Redshift cluster versions. You can call this operation even before * creating any clusters to learn more about the Amazon Redshift versions. For more information about managing * clusters, go to Amazon * Redshift Clusters in the Amazon Redshift Cluster Management Guide. *

* * @param describeClusterVersionsRequest * @return A Java Future containing the result of the DescribeClusterVersions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeClusterVersions * @see AWS API Documentation */ @Override public CompletableFuture describeClusterVersions( DescribeClusterVersionsRequest describeClusterVersionsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeClusterVersionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeClusterVersionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeClusterVersions"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeClusterVersionsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeClusterVersions").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeClusterVersionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeClusterVersionsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns properties of provisioned clusters including general cluster properties, cluster database properties, * maintenance and backup properties, and security and access properties. This operation supports pagination. For * more information about managing clusters, go to Amazon Redshift Clusters * in the Amazon Redshift Cluster Management Guide. *

*

* If you specify both tag keys and tag values in the same request, Amazon Redshift returns all clusters that match * any combination of the specified keys and values. For example, if you have owner and * environment for tag keys, and admin and test for tag values, all clusters * that have any combination of those values are returned. *

*

* If both tag keys and values are omitted from the request, clusters are returned regardless of whether they have * tag keys or values associated with them. *

* * @param describeClustersRequest * @return A Java Future containing the result of the DescribeClusters operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeClusters * @see AWS API * Documentation */ @Override public CompletableFuture describeClusters(DescribeClustersRequest describeClustersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeClustersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeClustersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeClusters"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeClustersResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeClusters").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeClustersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeClustersRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Contains information about custom domain associations for a cluster. *

* * @param describeCustomDomainAssociationsRequest * @return A Java Future containing the result of the DescribeCustomDomainAssociations operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • CustomDomainAssociationNotFoundException An error occurred. The custom domain name couldn't be found. *
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeCustomDomainAssociations * @see AWS API Documentation */ @Override public CompletableFuture describeCustomDomainAssociations( DescribeCustomDomainAssociationsRequest describeCustomDomainAssociationsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeCustomDomainAssociationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeCustomDomainAssociationsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeCustomDomainAssociations"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeCustomDomainAssociationsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeCustomDomainAssociations").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeCustomDomainAssociationsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeCustomDomainAssociationsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Shows the status of any inbound or outbound datashares available in the specified account. *

* * @param describeDataSharesRequest * @return A Java Future containing the result of the DescribeDataShares operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidDataShareException There is an error with the datashare.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeDataShares * @see AWS * API Documentation */ @Override public CompletableFuture describeDataShares(DescribeDataSharesRequest describeDataSharesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDataSharesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDataSharesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDataShares"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeDataSharesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeDataShares").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeDataSharesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeDataSharesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of datashares where the account identifier being called is a consumer account identifier. *

* * @param describeDataSharesForConsumerRequest * @return A Java Future containing the result of the DescribeDataSharesForConsumer operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidNamespaceException The namespace isn't valid because the namespace doesn't exist. Provide a * valid namespace.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeDataSharesForConsumer * @see AWS API Documentation */ @Override public CompletableFuture describeDataSharesForConsumer( DescribeDataSharesForConsumerRequest describeDataSharesForConsumerRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDataSharesForConsumerRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDataSharesForConsumerRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDataSharesForConsumer"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeDataSharesForConsumerResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeDataSharesForConsumer").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeDataSharesForConsumerRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeDataSharesForConsumerRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of datashares when the account identifier being called is a producer account identifier. *

* * @param describeDataSharesForProducerRequest * @return A Java Future containing the result of the DescribeDataSharesForProducer operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidNamespaceException The namespace isn't valid because the namespace doesn't exist. Provide a * valid namespace.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeDataSharesForProducer * @see AWS API Documentation */ @Override public CompletableFuture describeDataSharesForProducer( DescribeDataSharesForProducerRequest describeDataSharesForProducerRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDataSharesForProducerRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDataSharesForProducerRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDataSharesForProducer"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeDataSharesForProducerResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeDataSharesForProducer").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeDataSharesForProducerRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeDataSharesForProducerRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of parameter settings for the specified parameter group family. *

*

* For more information about parameters and parameter groups, go to Amazon Redshift * Parameter Groups in the Amazon Redshift Cluster Management Guide. *

* * @param describeDefaultClusterParametersRequest * @return A Java Future containing the result of the DescribeDefaultClusterParameters operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeDefaultClusterParameters * @see AWS API Documentation */ @Override public CompletableFuture describeDefaultClusterParameters( DescribeDefaultClusterParametersRequest describeDefaultClusterParametersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeDefaultClusterParametersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeDefaultClusterParametersRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeDefaultClusterParameters"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeDefaultClusterParametersResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeDefaultClusterParameters").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeDefaultClusterParametersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeDefaultClusterParametersRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Describes a Redshift-managed VPC endpoint. *

* * @param describeEndpointAccessRequest * @return A Java Future containing the result of the DescribeEndpointAccess operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • EndpointNotFoundException The endpoint name doesn't refer to an existing endpoint.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeEndpointAccess * @see AWS API Documentation */ @Override public CompletableFuture describeEndpointAccess( DescribeEndpointAccessRequest describeEndpointAccessRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEndpointAccessRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEndpointAccessRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEndpointAccess"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeEndpointAccessResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEndpointAccess").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeEndpointAccessRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeEndpointAccessRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Describes an endpoint authorization. *

* * @param describeEndpointAuthorizationRequest * @return A Java Future containing the result of the DescribeEndpointAuthorization operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeEndpointAuthorization * @see AWS API Documentation */ @Override public CompletableFuture describeEndpointAuthorization( DescribeEndpointAuthorizationRequest describeEndpointAuthorizationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEndpointAuthorizationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEndpointAuthorizationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEndpointAuthorization"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeEndpointAuthorizationResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEndpointAuthorization").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeEndpointAuthorizationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeEndpointAuthorizationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Displays a list of event categories for all event source types, or for a specified source type. For a list of the * event categories and source types, go to Amazon Redshift * Event Notifications. *

* * @param describeEventCategoriesRequest * @return A Java Future containing the result of the DescribeEventCategories operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeEventCategories * @see AWS API Documentation */ @Override public CompletableFuture describeEventCategories( DescribeEventCategoriesRequest describeEventCategoriesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEventCategoriesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEventCategoriesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEventCategories"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeEventCategoriesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEventCategories").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeEventCategoriesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeEventCategoriesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists descriptions of all the Amazon Redshift event notification subscriptions for a customer account. If you * specify a subscription name, lists the description for that subscription. *

*

* If you specify both tag keys and tag values in the same request, Amazon Redshift returns all event notification * subscriptions that match any combination of the specified keys and values. For example, if you have * owner and environment for tag keys, and admin and test for * tag values, all subscriptions that have any combination of those values are returned. *

*

* If both tag keys and values are omitted from the request, subscriptions are returned regardless of whether they * have tag keys or values associated with them. *

* * @param describeEventSubscriptionsRequest * @return A Java Future containing the result of the DescribeEventSubscriptions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • SubscriptionNotFoundException An Amazon Redshift event notification subscription with the specified * name does not exist.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeEventSubscriptions * @see AWS API Documentation */ @Override public CompletableFuture describeEventSubscriptions( DescribeEventSubscriptionsRequest describeEventSubscriptionsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEventSubscriptionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEventSubscriptionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEventSubscriptions"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeEventSubscriptionsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEventSubscriptions").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeEventSubscriptionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeEventSubscriptionsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns events related to clusters, security groups, snapshots, and parameter groups for the past 14 days. Events * specific to a particular cluster, security group, snapshot or parameter group can be obtained by providing the * name as a parameter. By default, the past hour of events are returned. *

* * @param describeEventsRequest * @return A Java Future containing the result of the DescribeEvents operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeEvents * @see AWS API * Documentation */ @Override public CompletableFuture describeEvents(DescribeEventsRequest describeEventsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeEventsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEventsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEvents"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeEventsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEvents").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeEventsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeEventsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about the specified HSM client certificate. If no certificate ID is specified, returns * information about all the HSM certificates owned by your Amazon Web Services account. *

*

* If you specify both tag keys and tag values in the same request, Amazon Redshift returns all HSM client * certificates that match any combination of the specified keys and values. For example, if you have * owner and environment for tag keys, and admin and test for * tag values, all HSM client certificates that have any combination of those values are returned. *

*

* If both tag keys and values are omitted from the request, HSM client certificates are returned regardless of * whether they have tag keys or values associated with them. *

* * @param describeHsmClientCertificatesRequest * @return A Java Future containing the result of the DescribeHsmClientCertificates operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • HsmClientCertificateNotFoundException There is no Amazon Redshift HSM client certificate with the * specified identifier.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeHsmClientCertificates * @see AWS API Documentation */ @Override public CompletableFuture describeHsmClientCertificates( DescribeHsmClientCertificatesRequest describeHsmClientCertificatesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeHsmClientCertificatesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeHsmClientCertificatesRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeHsmClientCertificates"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeHsmClientCertificatesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeHsmClientCertificates").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeHsmClientCertificatesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeHsmClientCertificatesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about the specified Amazon Redshift HSM configuration. If no configuration ID is specified, * returns information about all the HSM configurations owned by your Amazon Web Services account. *

*

* If you specify both tag keys and tag values in the same request, Amazon Redshift returns all HSM connections that * match any combination of the specified keys and values. For example, if you have owner and * environment for tag keys, and admin and test for tag values, all HSM * connections that have any combination of those values are returned. *

*

* If both tag keys and values are omitted from the request, HSM connections are returned regardless of whether they * have tag keys or values associated with them. *

* * @param describeHsmConfigurationsRequest * @return A Java Future containing the result of the DescribeHsmConfigurations operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • HsmConfigurationNotFoundException There is no Amazon Redshift HSM configuration with the specified * identifier.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeHsmConfigurations * @see AWS API Documentation */ @Override public CompletableFuture describeHsmConfigurations( DescribeHsmConfigurationsRequest describeHsmConfigurationsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeHsmConfigurationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeHsmConfigurationsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeHsmConfigurations"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeHsmConfigurationsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeHsmConfigurations").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeHsmConfigurationsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeHsmConfigurationsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of inbound integrations. *

* * @param describeInboundIntegrationsRequest * @return A Java Future containing the result of the DescribeInboundIntegrations operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • IntegrationNotFoundException The integration can't be found.
  • *
  • InvalidNamespaceException The namespace isn't valid because the namespace doesn't exist. Provide a * valid namespace.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeInboundIntegrations * @see AWS API Documentation */ @Override public CompletableFuture describeInboundIntegrations( DescribeInboundIntegrationsRequest describeInboundIntegrationsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeInboundIntegrationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeInboundIntegrationsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeInboundIntegrations"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeInboundIntegrationsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeInboundIntegrations").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeInboundIntegrationsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeInboundIntegrationsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Describes whether information, such as queries and connection attempts, is being logged for the specified Amazon * Redshift cluster. *

* * @param describeLoggingStatusRequest * @return A Java Future containing the result of the DescribeLoggingStatus operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeLoggingStatus * @see AWS API Documentation */ @Override public CompletableFuture describeLoggingStatus( DescribeLoggingStatusRequest describeLoggingStatusRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeLoggingStatusRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeLoggingStatusRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeLoggingStatus"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeLoggingStatusResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeLoggingStatus").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeLoggingStatusRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeLoggingStatusRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns properties of possible node configurations such as node type, number of nodes, and disk usage for the * specified action type. *

* * @param describeNodeConfigurationOptionsRequest * @return A Java Future containing the result of the DescribeNodeConfigurationOptions operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterSnapshotNotFoundException The snapshot identifier does not refer to an existing cluster * snapshot.
  • *
  • InvalidClusterSnapshotStateException The specified cluster snapshot is not in the * available state, or other accounts are authorized to access the snapshot.
  • *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • AccessToSnapshotDeniedException The owner of the specified snapshot has not authorized your account * to access the snapshot.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeNodeConfigurationOptions * @see AWS API Documentation */ @Override public CompletableFuture describeNodeConfigurationOptions( DescribeNodeConfigurationOptionsRequest describeNodeConfigurationOptionsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeNodeConfigurationOptionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeNodeConfigurationOptionsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeNodeConfigurationOptions"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeNodeConfigurationOptionsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeNodeConfigurationOptions").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeNodeConfigurationOptionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeNodeConfigurationOptionsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of orderable cluster options. Before you create a new cluster you can use this operation to find * what options are available, such as the EC2 Availability Zones (AZ) in the specific Amazon Web Services Region * that you can specify, and the node types you can request. The node types differ by available storage, memory, CPU * and price. With the cost involved you might want to obtain a list of cluster options in the specific region and * specify values when creating a cluster. For more information about managing clusters, go to Amazon Redshift Clusters * in the Amazon Redshift Cluster Management Guide. *

* * @param describeOrderableClusterOptionsRequest * @return A Java Future containing the result of the DescribeOrderableClusterOptions operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeOrderableClusterOptions * @see AWS API Documentation */ @Override public CompletableFuture describeOrderableClusterOptions( DescribeOrderableClusterOptionsRequest describeOrderableClusterOptionsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeOrderableClusterOptionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeOrderableClusterOptionsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeOrderableClusterOptions"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeOrderableClusterOptionsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeOrderableClusterOptions").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeOrderableClusterOptionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeOrderableClusterOptionsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about the partner integrations defined for a cluster. *

* * @param describePartnersRequest * @return A Java Future containing the result of the DescribePartners operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • UnauthorizedPartnerIntegrationException The partner integration is not authorized.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribePartners * @see AWS API * Documentation */ @Override public CompletableFuture describePartners(DescribePartnersRequest describePartnersRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describePartnersRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describePartnersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribePartners"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribePartnersResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribePartners").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribePartnersRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describePartnersRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the Amazon Redshift IAM Identity Center applications. *

* * @param describeRedshiftIdcApplicationsRequest * @return A Java Future containing the result of the DescribeRedshiftIdcApplications operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • RedshiftIdcApplicationNotExistsException The application you attempted to find doesn't exist.
  • *
  • DependentServiceUnavailableException Your request cannot be completed because a dependent internal * service is temporarily unavailable. Wait 30 to 60 seconds and try again.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • DependentServiceAccessDeniedException A dependent service denied access for the integration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeRedshiftIdcApplications * @see AWS API Documentation */ @Override public CompletableFuture describeRedshiftIdcApplications( DescribeRedshiftIdcApplicationsRequest describeRedshiftIdcApplicationsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeRedshiftIdcApplicationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeRedshiftIdcApplicationsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeRedshiftIdcApplications"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeRedshiftIdcApplicationsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeRedshiftIdcApplications").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeRedshiftIdcApplicationsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeRedshiftIdcApplicationsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns exchange status details and associated metadata for a reserved-node exchange. Statuses include such * values as in progress and requested. *

* * @param describeReservedNodeExchangeStatusRequest * @return A Java Future containing the result of the DescribeReservedNodeExchangeStatus operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ReservedNodeNotFoundException The specified reserved compute node not found.
  • *
  • ReservedNodeExchangeNotFoundException The reserved-node exchange status wasn't found.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeReservedNodeExchangeStatus * @see AWS API Documentation */ @Override public CompletableFuture describeReservedNodeExchangeStatus( DescribeReservedNodeExchangeStatusRequest describeReservedNodeExchangeStatusRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeReservedNodeExchangeStatusRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeReservedNodeExchangeStatusRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeReservedNodeExchangeStatus"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeReservedNodeExchangeStatusResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReservedNodeExchangeStatus").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeReservedNodeExchangeStatusRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeReservedNodeExchangeStatusRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of the available reserved node offerings by Amazon Redshift with their descriptions including the * node type, the fixed and recurring costs of reserving the node and duration the node will be reserved for you. * These descriptions help you determine which reserve node offering you want to purchase. You then use the unique * offering ID in you call to PurchaseReservedNodeOffering to reserve one or more nodes for your Amazon * Redshift cluster. *

*

* For more information about reserved node offerings, go to Purchasing Reserved * Nodes in the Amazon Redshift Cluster Management Guide. *

* * @param describeReservedNodeOfferingsRequest * @return A Java Future containing the result of the DescribeReservedNodeOfferings operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ReservedNodeOfferingNotFoundException Specified offering does not exist.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • DependentServiceUnavailableException Your request cannot be completed because a dependent internal * service is temporarily unavailable. Wait 30 to 60 seconds and try again.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeReservedNodeOfferings * @see AWS API Documentation */ @Override public CompletableFuture describeReservedNodeOfferings( DescribeReservedNodeOfferingsRequest describeReservedNodeOfferingsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeReservedNodeOfferingsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeReservedNodeOfferingsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeReservedNodeOfferings"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeReservedNodeOfferingsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReservedNodeOfferings").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeReservedNodeOfferingsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeReservedNodeOfferingsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns the descriptions of the reserved nodes. *

* * @param describeReservedNodesRequest * @return A Java Future containing the result of the DescribeReservedNodes operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ReservedNodeNotFoundException The specified reserved compute node not found.
  • *
  • DependentServiceUnavailableException Your request cannot be completed because a dependent internal * service is temporarily unavailable. Wait 30 to 60 seconds and try again.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeReservedNodes * @see AWS API Documentation */ @Override public CompletableFuture describeReservedNodes( DescribeReservedNodesRequest describeReservedNodesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeReservedNodesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeReservedNodesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeReservedNodes"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeReservedNodesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReservedNodes").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeReservedNodesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeReservedNodesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about the last resize operation for the specified cluster. If no resize operation has ever * been initiated for the specified cluster, a HTTP 404 error is returned. If a resize operation was * initiated and completed, the status of the resize remains as SUCCEEDED until the next resize. *

*

* A resize operation can be requested using ModifyCluster and specifying a different number or type of nodes * for the cluster. *

* * @param describeResizeRequest * @return A Java Future containing the result of the DescribeResize operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • ResizeNotFoundException A resize operation for the specified cluster is not found.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeResize * @see AWS API * Documentation */ @Override public CompletableFuture describeResize(DescribeResizeRequest describeResizeRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeResizeRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeResizeRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeResize"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeResizeResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeResize").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeResizeRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeResizeRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Describes properties of scheduled actions. *

* * @param describeScheduledActionsRequest * @return A Java Future containing the result of the DescribeScheduledActions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ScheduledActionNotFoundException The scheduled action cannot be found.
  • *
  • UnauthorizedOperationException Your account is not authorized to perform the requested operation.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeScheduledActions * @see AWS API Documentation */ @Override public CompletableFuture describeScheduledActions( DescribeScheduledActionsRequest describeScheduledActionsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeScheduledActionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeScheduledActionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeScheduledActions"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeScheduledActionsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeScheduledActions").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeScheduledActionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeScheduledActionsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of snapshot copy grants owned by the Amazon Web Services account in the destination region. *

*

* For more information about managing snapshot copy grants, go to Amazon Redshift Database * Encryption in the Amazon Redshift Cluster Management Guide. *

* * @param describeSnapshotCopyGrantsRequest * The result of the DescribeSnapshotCopyGrants action. * @return A Java Future containing the result of the DescribeSnapshotCopyGrants operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • SnapshotCopyGrantNotFoundException The specified snapshot copy grant can't be found. Make sure that * the name is typed correctly and that the grant exists in the destination region.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeSnapshotCopyGrants * @see AWS API Documentation */ @Override public CompletableFuture describeSnapshotCopyGrants( DescribeSnapshotCopyGrantsRequest describeSnapshotCopyGrantsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeSnapshotCopyGrantsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeSnapshotCopyGrantsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeSnapshotCopyGrants"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeSnapshotCopyGrantsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeSnapshotCopyGrants").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeSnapshotCopyGrantsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeSnapshotCopyGrantsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of snapshot schedules. *

* * @param describeSnapshotSchedulesRequest * @return A Java Future containing the result of the DescribeSnapshotSchedules operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeSnapshotSchedules * @see AWS API Documentation */ @Override public CompletableFuture describeSnapshotSchedules( DescribeSnapshotSchedulesRequest describeSnapshotSchedulesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeSnapshotSchedulesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeSnapshotSchedulesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeSnapshotSchedules"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeSnapshotSchedulesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeSnapshotSchedules").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeSnapshotSchedulesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeSnapshotSchedulesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns account level backups storage size and provisional storage. *

* * @param describeStorageRequest * @return A Java Future containing the result of the DescribeStorage operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeStorage * @see AWS API * Documentation */ @Override public CompletableFuture describeStorage(DescribeStorageRequest describeStorageRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeStorageRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeStorageRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeStorage"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeStorageResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeStorage").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeStorageRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeStorageRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the status of one or more table restore requests made using the RestoreTableFromClusterSnapshot API * action. If you don't specify a value for the TableRestoreRequestId parameter, then * DescribeTableRestoreStatus returns the status of all table restore requests ordered by the date and * time of the request in ascending order. Otherwise DescribeTableRestoreStatus returns the status of * the table specified by TableRestoreRequestId. *

* * @param describeTableRestoreStatusRequest * @return A Java Future containing the result of the DescribeTableRestoreStatus operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • TableRestoreNotFoundException The specified TableRestoreRequestId value was not found.
  • *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeTableRestoreStatus * @see AWS API Documentation */ @Override public CompletableFuture describeTableRestoreStatus( DescribeTableRestoreStatusRequest describeTableRestoreStatusRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeTableRestoreStatusRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeTableRestoreStatusRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeTableRestoreStatus"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeTableRestoreStatusResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeTableRestoreStatus").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeTableRestoreStatusRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeTableRestoreStatusRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of tags. You can return tags from a specific resource by specifying an ARN, or you can return all * tags for a given type of resource, such as clusters, snapshots, and so on. *

*

* The following are limitations for DescribeTags: *

*
    *
  • *

    * You cannot specify an ARN and a resource-type value together in the same request. *

    *
  • *
  • *

    * You cannot use the MaxRecords and Marker parameters together with the ARN parameter. *

    *
  • *
  • *

    * The MaxRecords parameter can be a range from 10 to 50 results to return in a request. *

    *
  • *
*

* If you specify both tag keys and tag values in the same request, Amazon Redshift returns all resources that match * any combination of the specified keys and values. For example, if you have owner and * environment for tag keys, and admin and test for tag values, all resources * that have any combination of those values are returned. *

*

* If both tag keys and values are omitted from the request, resources are returned regardless of whether they have * tag keys or values associated with them. *

* * @param describeTagsRequest * @return A Java Future containing the result of the DescribeTags operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeTags * @see AWS API * Documentation */ @Override public CompletableFuture describeTags(DescribeTagsRequest describeTagsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeTagsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeTagsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeTags"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeTagsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeTags").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeTagsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeTagsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Shows usage limits on a cluster. Results are filtered based on the combination of input usage limit identifier, * cluster identifier, and feature type parameters: *

*
    *
  • *

    * If usage limit identifier, cluster identifier, and feature type are not provided, then all usage limit objects * for the current account in the current region are returned. *

    *
  • *
  • *

    * If usage limit identifier is provided, then the corresponding usage limit object is returned. *

    *
  • *
  • *

    * If cluster identifier is provided, then all usage limit objects for the specified cluster are returned. *

    *
  • *
  • *

    * If cluster identifier and feature type are provided, then all usage limit objects for the combination of cluster * and feature are returned. *

    *
  • *
* * @param describeUsageLimitsRequest * @return A Java Future containing the result of the DescribeUsageLimits operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DescribeUsageLimits * @see AWS * API Documentation */ @Override public CompletableFuture describeUsageLimits( DescribeUsageLimitsRequest describeUsageLimitsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeUsageLimitsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, describeUsageLimitsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeUsageLimits"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DescribeUsageLimitsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeUsageLimits").withProtocolMetadata(protocolMetadata) .withMarshaller(new DescribeUsageLimitsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(describeUsageLimitsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Stops logging information, such as queries and connection attempts, for the specified Amazon Redshift cluster. *

* * @param disableLoggingRequest * @return A Java Future containing the result of the DisableLogging operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DisableLogging * @see AWS API * Documentation */ @Override public CompletableFuture disableLogging(DisableLoggingRequest disableLoggingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disableLoggingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disableLoggingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisableLogging"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DisableLoggingResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisableLogging").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisableLoggingRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disableLoggingRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Disables the automatic copying of snapshots from one region to another region for a specified cluster. *

*

* If your cluster and its snapshots are encrypted using an encrypted symmetric key from Key Management Service, use * DeleteSnapshotCopyGrant to delete the grant that grants Amazon Redshift permission to the key in the * destination region. *

* * @param disableSnapshotCopyRequest * @return A Java Future containing the result of the DisableSnapshotCopy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • SnapshotCopyAlreadyDisabledException The cluster already has cross-region snapshot copy disabled.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • UnauthorizedOperationException Your account is not authorized to perform the requested operation.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DisableSnapshotCopy * @see AWS * API Documentation */ @Override public CompletableFuture disableSnapshotCopy( DisableSnapshotCopyRequest disableSnapshotCopyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disableSnapshotCopyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disableSnapshotCopyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisableSnapshotCopy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DisableSnapshotCopyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisableSnapshotCopy").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisableSnapshotCopyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disableSnapshotCopyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* From a datashare consumer account, remove association for the specified datashare. *

* * @param disassociateDataShareConsumerRequest * @return A Java Future containing the result of the DisassociateDataShareConsumer operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidDataShareException There is an error with the datashare.
  • *
  • InvalidNamespaceException The namespace isn't valid because the namespace doesn't exist. Provide a * valid namespace.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.DisassociateDataShareConsumer * @see AWS API Documentation */ @Override public CompletableFuture disassociateDataShareConsumer( DisassociateDataShareConsumerRequest disassociateDataShareConsumerRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateDataShareConsumerRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateDataShareConsumerRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateDataShareConsumer"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(DisassociateDataShareConsumerResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateDataShareConsumer").withProtocolMetadata(protocolMetadata) .withMarshaller(new DisassociateDataShareConsumerRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(disassociateDataShareConsumerRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Starts logging information, such as queries and connection attempts, for the specified Amazon Redshift cluster. *

* * @param enableLoggingRequest * @return A Java Future containing the result of the EnableLogging operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • BucketNotFoundException Could not find the specified S3 bucket.
  • *
  • InsufficientS3BucketPolicyException The cluster does not have read bucket or put object permissions * on the S3 bucket specified when enabling logging.
  • *
  • InvalidS3KeyPrefixException The string specified for the logging S3 key prefix does not comply with * the documented constraints.
  • *
  • InvalidS3BucketNameException The S3 bucket name is invalid. For more information about naming rules, * go to Bucket * Restrictions and Limitations in the Amazon Simple Storage Service (S3) Developer Guide.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.EnableLogging * @see AWS API * Documentation */ @Override public CompletableFuture enableLogging(EnableLoggingRequest enableLoggingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(enableLoggingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, enableLoggingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "EnableLogging"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(EnableLoggingResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("EnableLogging").withProtocolMetadata(protocolMetadata) .withMarshaller(new EnableLoggingRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(enableLoggingRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Enables the automatic copy of snapshots from one region to another region for a specified cluster. *

* * @param enableSnapshotCopyRequest * @return A Java Future containing the result of the EnableSnapshotCopy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • IncompatibleOrderableOptionsException The specified options are incompatible.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • CopyToRegionDisabledException Cross-region snapshot copy was temporarily disabled. Try your request * again.
  • *
  • SnapshotCopyAlreadyEnabledException The cluster already has cross-region snapshot copy enabled.
  • *
  • UnknownSnapshotCopyRegionException The specified region is incorrect or does not exist.
  • *
  • UnauthorizedOperationException Your account is not authorized to perform the requested operation.
  • *
  • SnapshotCopyGrantNotFoundException The specified snapshot copy grant can't be found. Make sure that * the name is typed correctly and that the grant exists in the destination region.
  • *
  • LimitExceededException The encryption key has exceeded its grant limit in Amazon Web Services KMS.
  • *
  • DependentServiceRequestThrottlingException The request cannot be completed because a dependent * service is throttling requests made by Amazon Redshift on your behalf. Wait and retry the request.
  • *
  • InvalidRetentionPeriodException The retention period specified is either in the past or is not a * valid value.

    *

    * The value must be either -1 or an integer between 1 and 3,653.

  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.EnableSnapshotCopy * @see AWS * API Documentation */ @Override public CompletableFuture enableSnapshotCopy(EnableSnapshotCopyRequest enableSnapshotCopyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(enableSnapshotCopyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, enableSnapshotCopyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "EnableSnapshotCopy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(EnableSnapshotCopyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("EnableSnapshotCopy").withProtocolMetadata(protocolMetadata) .withMarshaller(new EnableSnapshotCopyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(enableSnapshotCopyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Fails over the primary compute unit of the specified Multi-AZ cluster to another Availability Zone. *

* * @param failoverPrimaryComputeRequest * @return A Java Future containing the result of the FailoverPrimaryCompute operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • UnauthorizedOperationException Your account is not authorized to perform the requested operation.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.FailoverPrimaryCompute * @see AWS API Documentation */ @Override public CompletableFuture failoverPrimaryCompute( FailoverPrimaryComputeRequest failoverPrimaryComputeRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(failoverPrimaryComputeRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, failoverPrimaryComputeRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "FailoverPrimaryCompute"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(FailoverPrimaryComputeResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("FailoverPrimaryCompute").withProtocolMetadata(protocolMetadata) .withMarshaller(new FailoverPrimaryComputeRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(failoverPrimaryComputeRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a database user name and temporary password with temporary authorization to log on to an Amazon Redshift * database. The action returns the database user name prefixed with IAM: if AutoCreate is * False or IAMA: if AutoCreate is True. You can optionally * specify one or more database user groups that the user will join at log on. By default, the temporary credentials * expire in 900 seconds. You can optionally specify a duration between 900 seconds (15 minutes) and 3600 seconds * (60 minutes). For more information, see Using IAM Authentication * to Generate Database User Credentials in the Amazon Redshift Cluster Management Guide. *

*

* The Identity and Access Management (IAM) user or role that runs GetClusterCredentials must have an IAM policy * attached that allows access to all necessary actions and resources. For more information about permissions, see * Resource Policies for GetClusterCredentials in the Amazon Redshift Cluster Management Guide. *

*

* If the DbGroups parameter is specified, the IAM policy must allow the * redshift:JoinGroup action with access to the listed dbgroups. *

*

* In addition, if the AutoCreate parameter is set to True, then the policy must include * the redshift:CreateClusterUser permission. *

*

* If the DbName parameter is specified, the IAM policy must allow access to the resource * dbname for the specified database name. *

* * @param getClusterCredentialsRequest * The request parameters to get cluster credentials. * @return A Java Future containing the result of the GetClusterCredentials operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.GetClusterCredentials * @see AWS API Documentation */ @Override public CompletableFuture getClusterCredentials( GetClusterCredentialsRequest getClusterCredentialsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getClusterCredentialsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getClusterCredentialsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetClusterCredentials"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetClusterCredentialsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetClusterCredentials").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetClusterCredentialsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getClusterCredentialsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a database user name and temporary password with temporary authorization to log in to an Amazon Redshift * database. The database user is mapped 1:1 to the source Identity and Access Management (IAM) identity. For more * information about IAM identities, see IAM * Identities (users, user groups, and roles) in the Amazon Web Services Identity and Access Management User * Guide. *

*

* The Identity and Access Management (IAM) identity that runs this operation must have an IAM policy attached that * allows access to all necessary actions and resources. For more information about permissions, see Using * identity-based policies (IAM policies) in the Amazon Redshift Cluster Management Guide. *

* * @param getClusterCredentialsWithIamRequest * @return A Java Future containing the result of the GetClusterCredentialsWithIAM operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.GetClusterCredentialsWithIAM * @see AWS API Documentation */ @Override public CompletableFuture getClusterCredentialsWithIAM( GetClusterCredentialsWithIamRequest getClusterCredentialsWithIamRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getClusterCredentialsWithIamRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getClusterCredentialsWithIamRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetClusterCredentialsWithIAM"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetClusterCredentialsWithIamResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetClusterCredentialsWithIAM").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetClusterCredentialsWithIamRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getClusterCredentialsWithIamRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Gets the configuration options for the reserved-node exchange. These options include information about the source * reserved node and target reserved node offering. Details include the node type, the price, the node count, and * the offering type. *

* * @param getReservedNodeExchangeConfigurationOptionsRequest * @return A Java Future containing the result of the GetReservedNodeExchangeConfigurationOptions operation returned * by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ReservedNodeNotFoundException The specified reserved compute node not found.
  • *
  • InvalidReservedNodeStateException Indicates that the Reserved Node being exchanged is not in an * active state.
  • *
  • ReservedNodeAlreadyMigratedException Indicates that the reserved node has already been exchanged.
  • *
  • ReservedNodeOfferingNotFoundException Specified offering does not exist.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • DependentServiceUnavailableException Your request cannot be completed because a dependent internal * service is temporarily unavailable. Wait 30 to 60 seconds and try again.
  • *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • ClusterSnapshotNotFoundException The snapshot identifier does not refer to an existing cluster * snapshot.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.GetReservedNodeExchangeConfigurationOptions * @see AWS API Documentation */ @Override public CompletableFuture getReservedNodeExchangeConfigurationOptions( GetReservedNodeExchangeConfigurationOptionsRequest getReservedNodeExchangeConfigurationOptionsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( getReservedNodeExchangeConfigurationOptionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getReservedNodeExchangeConfigurationOptionsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetReservedNodeExchangeConfigurationOptions"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetReservedNodeExchangeConfigurationOptionsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetReservedNodeExchangeConfigurationOptions") .withProtocolMetadata(protocolMetadata) .withMarshaller(new GetReservedNodeExchangeConfigurationOptionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getReservedNodeExchangeConfigurationOptionsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns an array of DC2 ReservedNodeOfferings that matches the payment type, term, and usage price of the given * DC1 reserved node. *

* * @param getReservedNodeExchangeOfferingsRequest * @return A Java Future containing the result of the GetReservedNodeExchangeOfferings operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ReservedNodeNotFoundException The specified reserved compute node not found.
  • *
  • InvalidReservedNodeStateException Indicates that the Reserved Node being exchanged is not in an * active state.
  • *
  • ReservedNodeAlreadyMigratedException Indicates that the reserved node has already been exchanged.
  • *
  • ReservedNodeOfferingNotFoundException Specified offering does not exist.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • DependentServiceUnavailableException Your request cannot be completed because a dependent internal * service is temporarily unavailable. Wait 30 to 60 seconds and try again.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.GetReservedNodeExchangeOfferings * @see AWS API Documentation */ @Override public CompletableFuture getReservedNodeExchangeOfferings( GetReservedNodeExchangeOfferingsRequest getReservedNodeExchangeOfferingsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getReservedNodeExchangeOfferingsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getReservedNodeExchangeOfferingsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetReservedNodeExchangeOfferings"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetReservedNodeExchangeOfferingsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetReservedNodeExchangeOfferings").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetReservedNodeExchangeOfferingsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getReservedNodeExchangeOfferingsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Get the resource policy for a specified resource. *

* * @param getResourcePolicyRequest * @return A Java Future containing the result of the GetResourcePolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidPolicyException The resource policy isn't valid.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.GetResourcePolicy * @see AWS * API Documentation */ @Override public CompletableFuture getResourcePolicy(GetResourcePolicyRequest getResourcePolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getResourcePolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getResourcePolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetResourcePolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(GetResourcePolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetResourcePolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new GetResourcePolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(getResourcePolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* List the Amazon Redshift Advisor recommendations for one or multiple Amazon Redshift clusters in an Amazon Web * Services account. *

* * @param listRecommendationsRequest * @return A Java Future containing the result of the ListRecommendations operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ListRecommendations * @see AWS * API Documentation */ @Override public CompletableFuture listRecommendations( ListRecommendationsRequest listRecommendationsRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listRecommendationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listRecommendationsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRecommendations"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ListRecommendationsResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListRecommendations").withProtocolMetadata(protocolMetadata) .withMarshaller(new ListRecommendationsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(listRecommendationsRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* This operation is retired. Calling this operation does not change AQUA configuration. Amazon Redshift * automatically determines whether to use AQUA (Advanced Query Accelerator). *

* * @param modifyAquaConfigurationRequest * @return A Java Future containing the result of the ModifyAquaConfiguration operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifyAquaConfiguration * @see AWS API Documentation */ @Override public CompletableFuture modifyAquaConfiguration( ModifyAquaConfigurationRequest modifyAquaConfigurationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyAquaConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyAquaConfigurationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyAquaConfiguration"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyAquaConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyAquaConfiguration").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyAquaConfigurationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyAquaConfigurationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies an authentication profile. *

* * @param modifyAuthenticationProfileRequest * @return A Java Future containing the result of the ModifyAuthenticationProfile operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • AuthenticationProfileNotFoundException The authentication profile can't be found.
  • *
  • AuthenticationProfileQuotaExceededException The size or number of authentication profiles has * exceeded the quota. The maximum length of the JSON string and maximum number of authentication profiles * is determined by a quota for your account.
  • *
  • InvalidAuthenticationProfileRequestException The authentication profile request is not valid. The * profile name can't be null or empty. The authentication profile API operation must be available in the * Amazon Web Services Region.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifyAuthenticationProfile * @see AWS API Documentation */ @Override public CompletableFuture modifyAuthenticationProfile( ModifyAuthenticationProfileRequest modifyAuthenticationProfileRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyAuthenticationProfileRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyAuthenticationProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyAuthenticationProfile"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyAuthenticationProfileResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyAuthenticationProfile").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyAuthenticationProfileRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyAuthenticationProfileRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies the settings for a cluster. *

*

* You can also change node type and the number of nodes to scale up or down the cluster. When resizing a cluster, * you must specify both the number of nodes and the node type even if one of the parameters does not change. *

*

* You can add another security or parameter group, or change the admin user password. Resetting a cluster password * or modifying the security groups associated with a cluster do not need a reboot. However, modifying a parameter * group requires a reboot for parameters to take effect. For more information about managing clusters, go to Amazon Redshift Clusters * in the Amazon Redshift Cluster Management Guide. *

* * @param modifyClusterRequest * @return A Java Future containing the result of the ModifyCluster operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • InvalidClusterSecurityGroupStateException The state of the cluster security group is not * available.
  • *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • NumberOfNodesQuotaExceededException The operation would exceed the number of nodes allotted to the * account. For information about increasing your quota, go to Limits in Amazon * Redshift in the Amazon Redshift Cluster Management Guide.
  • *
  • NumberOfNodesPerClusterLimitExceededException The operation would exceed the number of nodes allowed * for a cluster.
  • *
  • ClusterSecurityGroupNotFoundException The cluster security group name does not refer to an existing * cluster security group.
  • *
  • ClusterParameterGroupNotFoundException The parameter group name does not refer to an existing * parameter group.
  • *
  • InsufficientClusterCapacityException The number of nodes specified exceeds the allotted capacity of * the cluster.
  • *
  • UnsupportedOptionException A request option was specified that is not supported.
  • *
  • UnauthorizedOperationException Your account is not authorized to perform the requested operation.
  • *
  • HsmClientCertificateNotFoundException There is no Amazon Redshift HSM client certificate with the * specified identifier.
  • *
  • HsmConfigurationNotFoundException There is no Amazon Redshift HSM configuration with the specified * identifier.
  • *
  • ClusterAlreadyExistsException The account already has a cluster with the given identifier.
  • *
  • LimitExceededException The encryption key has exceeded its grant limit in Amazon Web Services KMS.
  • *
  • DependentServiceRequestThrottlingException The request cannot be completed because a dependent * service is throttling requests made by Amazon Redshift on your behalf. Wait and retry the request.
  • *
  • InvalidElasticIpException The Elastic IP (EIP) is invalid or cannot be found.
  • *
  • TableLimitExceededException The number of tables in the cluster exceeds the limit for the requested * new cluster node type.
  • *
  • InvalidClusterTrackException The provided cluster track name is not valid.
  • *
  • InvalidRetentionPeriodException The retention period specified is either in the past or is not a * valid value.

    *

    * The value must be either -1 or an integer between 1 and 3,653.

  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • CustomCnameAssociationException An error occurred when an attempt was made to change the custom * domain association.
  • *
  • Ipv6CidrBlockNotFoundException There are no subnets in your VPC with associated IPv6 CIDR blocks. To * use dual-stack mode, associate an IPv6 CIDR block with each subnet in your VPC.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifyCluster * @see AWS API * Documentation */ @Override public CompletableFuture modifyCluster(ModifyClusterRequest modifyClusterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyClusterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyClusterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyCluster"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyCluster").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyClusterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyClusterRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies the database revision of a cluster. The database revision is a unique revision of the database running * in a cluster. *

* * @param modifyClusterDbRevisionRequest * @return A Java Future containing the result of the ModifyClusterDbRevision operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • ClusterOnLatestRevisionException Cluster is already on the latest database revision.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifyClusterDbRevision * @see AWS API Documentation */ @Override public CompletableFuture modifyClusterDbRevision( ModifyClusterDbRevisionRequest modifyClusterDbRevisionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyClusterDbRevisionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyClusterDbRevisionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyClusterDbRevision"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyClusterDbRevisionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyClusterDbRevision").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyClusterDbRevisionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyClusterDbRevisionRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies the list of Identity and Access Management (IAM) roles that can be used by the cluster to access other * Amazon Web Services services. *

*

* The maximum number of IAM roles that you can associate is subject to a quota. For more information, go to Quotas and limits in the * Amazon Redshift Cluster Management Guide. *

* * @param modifyClusterIamRolesRequest * @return A Java Future containing the result of the ModifyClusterIamRoles operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifyClusterIamRoles * @see AWS API Documentation */ @Override public CompletableFuture modifyClusterIamRoles( ModifyClusterIamRolesRequest modifyClusterIamRolesRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyClusterIamRolesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyClusterIamRolesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyClusterIamRoles"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyClusterIamRolesResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyClusterIamRoles").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyClusterIamRolesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyClusterIamRolesRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies the maintenance settings of a cluster. *

* * @param modifyClusterMaintenanceRequest * @return A Java Future containing the result of the ModifyClusterMaintenance operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifyClusterMaintenance * @see AWS API Documentation */ @Override public CompletableFuture modifyClusterMaintenance( ModifyClusterMaintenanceRequest modifyClusterMaintenanceRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyClusterMaintenanceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyClusterMaintenanceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyClusterMaintenance"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyClusterMaintenanceResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyClusterMaintenance").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyClusterMaintenanceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyClusterMaintenanceRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies the parameters of a parameter group. For the parameters parameter, it can't contain ASCII characters. *

*

* For more information about parameters and parameter groups, go to Amazon Redshift * Parameter Groups in the Amazon Redshift Cluster Management Guide. *

* * @param modifyClusterParameterGroupRequest * Describes a modify cluster parameter group operation. * @return A Java Future containing the result of the ModifyClusterParameterGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterParameterGroupNotFoundException The parameter group name does not refer to an existing * parameter group.
  • *
  • InvalidClusterParameterGroupStateException The cluster parameter group action can not be completed * because another task is in progress that involves the parameter group. Wait a few moments and try the * operation again.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifyClusterParameterGroup * @see AWS API Documentation */ @Override public CompletableFuture modifyClusterParameterGroup( ModifyClusterParameterGroupRequest modifyClusterParameterGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyClusterParameterGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyClusterParameterGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyClusterParameterGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyClusterParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyClusterParameterGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyClusterParameterGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyClusterParameterGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies the settings for a snapshot. *

*

* This exanmple modifies the manual retention period setting for a cluster snapshot. *

* * @param modifyClusterSnapshotRequest * @return A Java Future containing the result of the ModifyClusterSnapshot operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidClusterSnapshotStateException The specified cluster snapshot is not in the * available state, or other accounts are authorized to access the snapshot.
  • *
  • ClusterSnapshotNotFoundException The snapshot identifier does not refer to an existing cluster * snapshot.
  • *
  • InvalidRetentionPeriodException The retention period specified is either in the past or is not a * valid value.

    *

    * The value must be either -1 or an integer between 1 and 3,653.

  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifyClusterSnapshot * @see AWS API Documentation */ @Override public CompletableFuture modifyClusterSnapshot( ModifyClusterSnapshotRequest modifyClusterSnapshotRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyClusterSnapshotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyClusterSnapshotRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyClusterSnapshot"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyClusterSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyClusterSnapshot").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyClusterSnapshotRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyClusterSnapshotRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies a snapshot schedule for a cluster. *

* * @param modifyClusterSnapshotScheduleRequest * @return A Java Future containing the result of the ModifyClusterSnapshotSchedule operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • SnapshotScheduleNotFoundException We could not find the specified snapshot schedule.
  • *
  • InvalidClusterSnapshotScheduleStateException The cluster snapshot schedule state is not valid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifyClusterSnapshotSchedule * @see AWS API Documentation */ @Override public CompletableFuture modifyClusterSnapshotSchedule( ModifyClusterSnapshotScheduleRequest modifyClusterSnapshotScheduleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyClusterSnapshotScheduleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyClusterSnapshotScheduleRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyClusterSnapshotSchedule"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyClusterSnapshotScheduleResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyClusterSnapshotSchedule").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyClusterSnapshotScheduleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyClusterSnapshotScheduleRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies a cluster subnet group to include the specified list of VPC subnets. The operation replaces the existing * list of subnets with the new list of subnets. *

* * @param modifyClusterSubnetGroupRequest * @return A Java Future containing the result of the ModifyClusterSubnetGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterSubnetGroupNotFoundException The cluster subnet group name does not refer to an existing * cluster subnet group.
  • *
  • ClusterSubnetQuotaExceededException The request would result in user exceeding the allowed number of * subnets in a cluster subnet groups. For information about increasing your quota, go to Limits in Amazon * Redshift in the Amazon Redshift Cluster Management Guide.
  • *
  • SubnetAlreadyInUseException A specified subnet is already in use by another cluster.
  • *
  • InvalidSubnetException The requested subnet is not valid, or not all of the subnets are in the same * VPC.
  • *
  • UnauthorizedOperationException Your account is not authorized to perform the requested operation.
  • *
  • DependentServiceRequestThrottlingException The request cannot be completed because a dependent * service is throttling requests made by Amazon Redshift on your behalf. Wait and retry the request.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifyClusterSubnetGroup * @see AWS API Documentation */ @Override public CompletableFuture modifyClusterSubnetGroup( ModifyClusterSubnetGroupRequest modifyClusterSubnetGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyClusterSubnetGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyClusterSubnetGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyClusterSubnetGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyClusterSubnetGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyClusterSubnetGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyClusterSubnetGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyClusterSubnetGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Contains information for changing a custom domain association. *

* * @param modifyCustomDomainAssociationRequest * @return A Java Future containing the result of the ModifyCustomDomainAssociation operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • CustomCnameAssociationException An error occurred when an attempt was made to change the custom * domain association.
  • *
  • CustomDomainAssociationNotFoundException An error occurred. The custom domain name couldn't be found. *
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifyCustomDomainAssociation * @see AWS API Documentation */ @Override public CompletableFuture modifyCustomDomainAssociation( ModifyCustomDomainAssociationRequest modifyCustomDomainAssociationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyCustomDomainAssociationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyCustomDomainAssociationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyCustomDomainAssociation"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyCustomDomainAssociationResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyCustomDomainAssociation").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyCustomDomainAssociationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyCustomDomainAssociationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies a Redshift-managed VPC endpoint. *

* * @param modifyEndpointAccessRequest * @return A Java Future containing the result of the ModifyEndpointAccess operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidClusterSecurityGroupStateException The state of the cluster security group is not * available.
  • *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • InvalidEndpointStateException The status of the endpoint is not valid.
  • *
  • EndpointNotFoundException The endpoint name doesn't refer to an existing endpoint.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • UnauthorizedOperationException Your account is not authorized to perform the requested operation.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifyEndpointAccess * @see AWS * API Documentation */ @Override public CompletableFuture modifyEndpointAccess( ModifyEndpointAccessRequest modifyEndpointAccessRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyEndpointAccessRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyEndpointAccessRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyEndpointAccess"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyEndpointAccessResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyEndpointAccess").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyEndpointAccessRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyEndpointAccessRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies an existing Amazon Redshift event notification subscription. *

* * @param modifyEventSubscriptionRequest * @return A Java Future containing the result of the ModifyEventSubscription operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • SubscriptionNotFoundException An Amazon Redshift event notification subscription with the specified * name does not exist.
  • *
  • SnsInvalidTopicException Amazon SNS has responded that there is a problem with the specified Amazon * SNS topic.
  • *
  • SnsNoAuthorizationException You do not have permission to publish to the specified Amazon SNS topic.
  • *
  • SnsTopicArnNotFoundException An Amazon SNS topic with the specified Amazon Resource Name (ARN) does * not exist.
  • *
  • SubscriptionEventIdNotFoundException An Amazon Redshift event with the specified event ID does not * exist.
  • *
  • SubscriptionCategoryNotFoundException The value specified for the event category was not one of the * allowed values, or it specified a category that does not apply to the specified source type. The allowed * values are Configuration, Management, Monitoring, and Security.
  • *
  • SubscriptionSeverityNotFoundException The value specified for the event severity was not one of the * allowed values, or it specified a severity that does not apply to the specified source type. The allowed * values are ERROR and INFO.
  • *
  • SourceNotFoundException The specified Amazon Redshift event source could not be found.
  • *
  • InvalidSubscriptionStateException The subscription request is invalid because it is a duplicate * request. This subscription request is already in progress.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifyEventSubscription * @see AWS API Documentation */ @Override public CompletableFuture modifyEventSubscription( ModifyEventSubscriptionRequest modifyEventSubscriptionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyEventSubscriptionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyEventSubscriptionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyEventSubscription"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyEventSubscriptionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyEventSubscription").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyEventSubscriptionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyEventSubscriptionRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Changes an existing Amazon Redshift IAM Identity Center application. *

* * @param modifyRedshiftIdcApplicationRequest * @return A Java Future containing the result of the ModifyRedshiftIdcApplication operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • RedshiftIdcApplicationNotExistsException The application you attempted to find doesn't exist.
  • *
  • DependentServiceUnavailableException Your request cannot be completed because a dependent internal * service is temporarily unavailable. Wait 30 to 60 seconds and try again.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • DependentServiceAccessDeniedException A dependent service denied access for the integration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifyRedshiftIdcApplication * @see AWS API Documentation */ @Override public CompletableFuture modifyRedshiftIdcApplication( ModifyRedshiftIdcApplicationRequest modifyRedshiftIdcApplicationRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyRedshiftIdcApplicationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyRedshiftIdcApplicationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyRedshiftIdcApplication"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyRedshiftIdcApplicationResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyRedshiftIdcApplication").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyRedshiftIdcApplicationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyRedshiftIdcApplicationRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies a scheduled action. *

* * @param modifyScheduledActionRequest * @return A Java Future containing the result of the ModifyScheduledAction operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • ScheduledActionNotFoundException The scheduled action cannot be found.
  • *
  • ScheduledActionTypeUnsupportedException The action type specified for a scheduled action is not * supported.
  • *
  • InvalidScheduleException The schedule you submitted isn't valid.
  • *
  • InvalidScheduledActionException The scheduled action is not valid.
  • *
  • UnauthorizedOperationException Your account is not authorized to perform the requested operation.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifyScheduledAction * @see AWS API Documentation */ @Override public CompletableFuture modifyScheduledAction( ModifyScheduledActionRequest modifyScheduledActionRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyScheduledActionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyScheduledActionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyScheduledAction"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyScheduledActionResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyScheduledAction").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyScheduledActionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyScheduledActionRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies the number of days to retain snapshots in the destination Amazon Web Services Region after they are * copied from the source Amazon Web Services Region. By default, this operation only changes the retention period * of copied automated snapshots. The retention periods for both new and existing copied automated snapshots are * updated with the new retention period. You can set the manual option to change only the retention periods of * copied manual snapshots. If you set this option, only newly copied manual snapshots have the new retention * period. *

* * @param modifySnapshotCopyRetentionPeriodRequest * @return A Java Future containing the result of the ModifySnapshotCopyRetentionPeriod operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • SnapshotCopyDisabledException Cross-region snapshot copy was temporarily disabled. Try your request * again.
  • *
  • UnauthorizedOperationException Your account is not authorized to perform the requested operation.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • InvalidRetentionPeriodException The retention period specified is either in the past or is not a * valid value.

    *

    * The value must be either -1 or an integer between 1 and 3,653.

  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifySnapshotCopyRetentionPeriod * @see AWS API Documentation */ @Override public CompletableFuture modifySnapshotCopyRetentionPeriod( ModifySnapshotCopyRetentionPeriodRequest modifySnapshotCopyRetentionPeriodRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifySnapshotCopyRetentionPeriodRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifySnapshotCopyRetentionPeriodRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifySnapshotCopyRetentionPeriod"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifySnapshotCopyRetentionPeriodResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifySnapshotCopyRetentionPeriod").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifySnapshotCopyRetentionPeriodRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifySnapshotCopyRetentionPeriodRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies a snapshot schedule. Any schedule associated with a cluster is modified asynchronously. *

* * @param modifySnapshotScheduleRequest * @return A Java Future containing the result of the ModifySnapshotSchedule operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidScheduleException The schedule you submitted isn't valid.
  • *
  • SnapshotScheduleNotFoundException We could not find the specified snapshot schedule.
  • *
  • SnapshotScheduleUpdateInProgressException The specified snapshot schedule is already being updated.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifySnapshotSchedule * @see AWS API Documentation */ @Override public CompletableFuture modifySnapshotSchedule( ModifySnapshotScheduleRequest modifySnapshotScheduleRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifySnapshotScheduleRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifySnapshotScheduleRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifySnapshotSchedule"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifySnapshotScheduleResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifySnapshotSchedule").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifySnapshotScheduleRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifySnapshotScheduleRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies a usage limit in a cluster. You can't modify the feature type or period of a usage limit. *

* * @param modifyUsageLimitRequest * @return A Java Future containing the result of the ModifyUsageLimit operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidUsageLimitException The usage limit is not valid.
  • *
  • UsageLimitNotFoundException The usage limit identifier can't be found.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ModifyUsageLimit * @see AWS API * Documentation */ @Override public CompletableFuture modifyUsageLimit(ModifyUsageLimitRequest modifyUsageLimitRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyUsageLimitRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyUsageLimitRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyUsageLimit"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ModifyUsageLimitResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyUsageLimit").withProtocolMetadata(protocolMetadata) .withMarshaller(new ModifyUsageLimitRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(modifyUsageLimitRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Pauses a cluster. *

* * @param pauseClusterRequest * Describes a pause cluster operation. For example, a scheduled action to run the PauseCluster * API operation. * @return A Java Future containing the result of the PauseCluster operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.PauseCluster * @see AWS API * Documentation */ @Override public CompletableFuture pauseCluster(PauseClusterRequest pauseClusterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(pauseClusterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, pauseClusterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PauseCluster"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(PauseClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PauseCluster").withProtocolMetadata(protocolMetadata) .withMarshaller(new PauseClusterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(pauseClusterRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Allows you to purchase reserved nodes. Amazon Redshift offers a predefined set of reserved node offerings. You * can purchase one or more of the offerings. You can call the DescribeReservedNodeOfferings API to obtain * the available reserved node offerings. You can call this API by providing a specific reserved node offering and * the number of nodes you want to reserve. *

*

* For more information about reserved node offerings, go to Purchasing Reserved * Nodes in the Amazon Redshift Cluster Management Guide. *

* * @param purchaseReservedNodeOfferingRequest * @return A Java Future containing the result of the PurchaseReservedNodeOffering operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ReservedNodeOfferingNotFoundException Specified offering does not exist.
  • *
  • ReservedNodeAlreadyExistsException User already has a reservation with the given identifier.
  • *
  • ReservedNodeQuotaExceededException Request would exceed the user's compute node quota. For * information about increasing your quota, go to Limits in Amazon * Redshift in the Amazon Redshift Cluster Management Guide.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.PurchaseReservedNodeOffering * @see AWS API Documentation */ @Override public CompletableFuture purchaseReservedNodeOffering( PurchaseReservedNodeOfferingRequest purchaseReservedNodeOfferingRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(purchaseReservedNodeOfferingRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, purchaseReservedNodeOfferingRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PurchaseReservedNodeOffering"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(PurchaseReservedNodeOfferingResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PurchaseReservedNodeOffering").withProtocolMetadata(protocolMetadata) .withMarshaller(new PurchaseReservedNodeOfferingRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(purchaseReservedNodeOfferingRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates the resource policy for a specified resource. *

* * @param putResourcePolicyRequest * @return A Java Future containing the result of the PutResourcePolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidPolicyException The resource policy isn't valid.
  • *
  • ConflictPolicyUpdateException There is a conflict while updating the resource policy.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.PutResourcePolicy * @see AWS * API Documentation */ @Override public CompletableFuture putResourcePolicy(PutResourcePolicyRequest putResourcePolicyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putResourcePolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putResourcePolicyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutResourcePolicy"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(PutResourcePolicyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("PutResourcePolicy").withProtocolMetadata(protocolMetadata) .withMarshaller(new PutResourcePolicyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(putResourcePolicyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Reboots a cluster. This action is taken as soon as possible. It results in a momentary outage to the cluster, * during which the cluster status is set to rebooting. A cluster event is created when the reboot is * completed. Any pending cluster modifications (see ModifyCluster) are applied at this reboot. For more * information about managing clusters, go to Amazon Redshift Clusters * in the Amazon Redshift Cluster Management Guide. *

* * @param rebootClusterRequest * @return A Java Future containing the result of the RebootCluster operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.RebootCluster * @see AWS API * Documentation */ @Override public CompletableFuture rebootCluster(RebootClusterRequest rebootClusterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(rebootClusterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, rebootClusterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RebootCluster"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RebootClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RebootCluster").withProtocolMetadata(protocolMetadata) .withMarshaller(new RebootClusterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(rebootClusterRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* From a datashare consumer account, rejects the specified datashare. *

* * @param rejectDataShareRequest * @return A Java Future containing the result of the RejectDataShare operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidDataShareException There is an error with the datashare.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.RejectDataShare * @see AWS API * Documentation */ @Override public CompletableFuture rejectDataShare(RejectDataShareRequest rejectDataShareRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(rejectDataShareRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, rejectDataShareRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RejectDataShare"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RejectDataShareResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RejectDataShare").withProtocolMetadata(protocolMetadata) .withMarshaller(new RejectDataShareRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(rejectDataShareRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Sets one or more parameters of the specified parameter group to their default values and sets the source values * of the parameters to "engine-default". To reset the entire parameter group specify the ResetAllParameters * parameter. For parameter changes to take effect you must reboot any associated clusters. *

* * @param resetClusterParameterGroupRequest * @return A Java Future containing the result of the ResetClusterParameterGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidClusterParameterGroupStateException The cluster parameter group action can not be completed * because another task is in progress that involves the parameter group. Wait a few moments and try the * operation again.
  • *
  • ClusterParameterGroupNotFoundException The parameter group name does not refer to an existing * parameter group.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ResetClusterParameterGroup * @see AWS API Documentation */ @Override public CompletableFuture resetClusterParameterGroup( ResetClusterParameterGroupRequest resetClusterParameterGroupRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(resetClusterParameterGroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, resetClusterParameterGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ResetClusterParameterGroup"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ResetClusterParameterGroupResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ResetClusterParameterGroup").withProtocolMetadata(protocolMetadata) .withMarshaller(new ResetClusterParameterGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(resetClusterParameterGroupRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Changes the size of the cluster. You can change the cluster's type, or change the number or type of nodes. The * default behavior is to use the elastic resize method. With an elastic resize, your cluster is available for read * and write operations more quickly than with the classic resize method. *

*

* Elastic resize operations have the following restrictions: *

*
    *
  • *

    * You can only resize clusters of the following types: *

    *
      *
    • *

      * dc2.large *

      *
    • *
    • *

      * dc2.8xlarge *

      *
    • *
    • *

      * ra3.xlplus *

      *
    • *
    • *

      * ra3.4xlarge *

      *
    • *
    • *

      * ra3.16xlarge *

      *
    • *
    *
  • *
  • *

    * The type of nodes that you add must match the node type for the cluster. *

    *
  • *
* * @param resizeClusterRequest * Describes a resize cluster operation. For example, a scheduled action to run the * ResizeCluster API operation. * @return A Java Future containing the result of the ResizeCluster operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • NumberOfNodesQuotaExceededException The operation would exceed the number of nodes allotted to the * account. For information about increasing your quota, go to Limits in Amazon * Redshift in the Amazon Redshift Cluster Management Guide.
  • *
  • NumberOfNodesPerClusterLimitExceededException The operation would exceed the number of nodes allowed * for a cluster.
  • *
  • InsufficientClusterCapacityException The number of nodes specified exceeds the allotted capacity of * the cluster.
  • *
  • UnsupportedOptionException A request option was specified that is not supported.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • UnauthorizedOperationException Your account is not authorized to perform the requested operation.
  • *
  • LimitExceededException The encryption key has exceeded its grant limit in Amazon Web Services KMS.
  • *
  • ReservedNodeNotFoundException The specified reserved compute node not found.
  • *
  • InvalidReservedNodeStateException Indicates that the Reserved Node being exchanged is not in an * active state.
  • *
  • ReservedNodeAlreadyMigratedException Indicates that the reserved node has already been exchanged.
  • *
  • ReservedNodeOfferingNotFoundException Specified offering does not exist.
  • *
  • DependentServiceUnavailableException Your request cannot be completed because a dependent internal * service is temporarily unavailable. Wait 30 to 60 seconds and try again.
  • *
  • ReservedNodeAlreadyExistsException User already has a reservation with the given identifier.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ResizeCluster * @see AWS API * Documentation */ @Override public CompletableFuture resizeCluster(ResizeClusterRequest resizeClusterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(resizeClusterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, resizeClusterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ResizeCluster"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ResizeClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ResizeCluster").withProtocolMetadata(protocolMetadata) .withMarshaller(new ResizeClusterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(resizeClusterRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new cluster from a snapshot. By default, Amazon Redshift creates the resulting cluster with the same * configuration as the original cluster from which the snapshot was created, except that the new cluster is created * with the default cluster security and parameter groups. After Amazon Redshift creates the cluster, you can use * the ModifyCluster API to associate a different security group and different parameter group with the * restored cluster. If you are using a DS node type, you can also choose to change to another DS node type of the * same size during restore. *

*

* If you restore a cluster into a VPC, you must provide a cluster subnet group where you want the cluster restored. *

*

* For more information about working with snapshots, go to Amazon Redshift Snapshots * in the Amazon Redshift Cluster Management Guide. *

* * @param restoreFromClusterSnapshotRequest * @return A Java Future containing the result of the RestoreFromClusterSnapshot operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • AccessToSnapshotDeniedException The owner of the specified snapshot has not authorized your account * to access the snapshot.
  • *
  • ClusterAlreadyExistsException The account already has a cluster with the given identifier.
  • *
  • ClusterSnapshotNotFoundException The snapshot identifier does not refer to an existing cluster * snapshot.
  • *
  • ClusterQuotaExceededException The request would exceed the allowed number of cluster instances for * this account. For information about increasing your quota, go to Limits in Amazon * Redshift in the Amazon Redshift Cluster Management Guide.
  • *
  • InsufficientClusterCapacityException The number of nodes specified exceeds the allotted capacity of * the cluster.
  • *
  • InvalidClusterSnapshotStateException The specified cluster snapshot is not in the * available state, or other accounts are authorized to access the snapshot.
  • *
  • InvalidRestoreException The restore is invalid.
  • *
  • NumberOfNodesQuotaExceededException The operation would exceed the number of nodes allotted to the * account. For information about increasing your quota, go to Limits in Amazon * Redshift in the Amazon Redshift Cluster Management Guide.
  • *
  • NumberOfNodesPerClusterLimitExceededException The operation would exceed the number of nodes allowed * for a cluster.
  • *
  • InvalidVpcNetworkStateException The cluster subnet group does not cover all Availability Zones.
  • *
  • InvalidClusterSubnetGroupStateException The cluster subnet group cannot be deleted because it is in * use.
  • *
  • InvalidSubnetException The requested subnet is not valid, or not all of the subnets are in the same * VPC.
  • *
  • ClusterSubnetGroupNotFoundException The cluster subnet group name does not refer to an existing * cluster subnet group.
  • *
  • UnauthorizedOperationException Your account is not authorized to perform the requested operation.
  • *
  • HsmClientCertificateNotFoundException There is no Amazon Redshift HSM client certificate with the * specified identifier.
  • *
  • HsmConfigurationNotFoundException There is no Amazon Redshift HSM configuration with the specified * identifier.
  • *
  • InvalidElasticIpException The Elastic IP (EIP) is invalid or cannot be found.
  • *
  • ClusterParameterGroupNotFoundException The parameter group name does not refer to an existing * parameter group.
  • *
  • ClusterSecurityGroupNotFoundException The cluster security group name does not refer to an existing * cluster security group.
  • *
  • LimitExceededException The encryption key has exceeded its grant limit in Amazon Web Services KMS.
  • *
  • DependentServiceRequestThrottlingException The request cannot be completed because a dependent * service is throttling requests made by Amazon Redshift on your behalf. Wait and retry the request.
  • *
  • InvalidClusterTrackException The provided cluster track name is not valid.
  • *
  • SnapshotScheduleNotFoundException We could not find the specified snapshot schedule.
  • *
  • TagLimitExceededException You have exceeded the number of tags allowed.
  • *
  • InvalidTagException The tag is invalid.
  • *
  • ReservedNodeNotFoundException The specified reserved compute node not found.
  • *
  • InvalidReservedNodeStateException Indicates that the Reserved Node being exchanged is not in an * active state.
  • *
  • ReservedNodeAlreadyMigratedException Indicates that the reserved node has already been exchanged.
  • *
  • ReservedNodeOfferingNotFoundException Specified offering does not exist.
  • *
  • DependentServiceUnavailableException Your request cannot be completed because a dependent internal * service is temporarily unavailable. Wait 30 to 60 seconds and try again.
  • *
  • ReservedNodeAlreadyExistsException User already has a reservation with the given identifier.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • Ipv6CidrBlockNotFoundException There are no subnets in your VPC with associated IPv6 CIDR blocks. To * use dual-stack mode, associate an IPv6 CIDR block with each subnet in your VPC.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.RestoreFromClusterSnapshot * @see AWS API Documentation */ @Override public CompletableFuture restoreFromClusterSnapshot( RestoreFromClusterSnapshotRequest restoreFromClusterSnapshotRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(restoreFromClusterSnapshotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, restoreFromClusterSnapshotRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RestoreFromClusterSnapshot"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RestoreFromClusterSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RestoreFromClusterSnapshot").withProtocolMetadata(protocolMetadata) .withMarshaller(new RestoreFromClusterSnapshotRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(restoreFromClusterSnapshotRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new table from a table in an Amazon Redshift cluster snapshot. You must create the new table within the * Amazon Redshift cluster that the snapshot was taken from. *

*

* You cannot use RestoreTableFromClusterSnapshot to restore a table with the same name as an existing * table in an Amazon Redshift cluster. That is, you cannot overwrite an existing table in a cluster with a restored * table. If you want to replace your original table with a new, restored table, then rename or drop your original * table before you call RestoreTableFromClusterSnapshot. When you have renamed your original table, * then you can pass the original name of the table as the NewTableName parameter value in the call to * RestoreTableFromClusterSnapshot. This way, you can replace the original table with the table created * from the snapshot. *

*

* You can't use this operation to restore tables with interleaved * sort keys. *

* * @param restoreTableFromClusterSnapshotRequest * @return A Java Future containing the result of the RestoreTableFromClusterSnapshot operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterSnapshotNotFoundException The snapshot identifier does not refer to an existing cluster * snapshot.
  • *
  • InProgressTableRestoreQuotaExceededException You have exceeded the allowed number of table restore * requests. Wait for your current table restore requests to complete before making a new request.
  • *
  • InvalidClusterSnapshotStateException The specified cluster snapshot is not in the * available state, or other accounts are authorized to access the snapshot.
  • *
  • InvalidTableRestoreArgumentException The value specified for the sourceDatabaseName, * sourceSchemaName, or sourceTableName parameter, or a combination of these, * doesn't exist in the snapshot.
  • *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.RestoreTableFromClusterSnapshot * @see AWS API Documentation */ @Override public CompletableFuture restoreTableFromClusterSnapshot( RestoreTableFromClusterSnapshotRequest restoreTableFromClusterSnapshotRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(restoreTableFromClusterSnapshotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, restoreTableFromClusterSnapshotRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RestoreTableFromClusterSnapshot"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RestoreTableFromClusterSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RestoreTableFromClusterSnapshot").withProtocolMetadata(protocolMetadata) .withMarshaller(new RestoreTableFromClusterSnapshotRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(restoreTableFromClusterSnapshotRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Resumes a paused cluster. *

* * @param resumeClusterRequest * Describes a resume cluster operation. For example, a scheduled action to run the * ResumeCluster API operation. * @return A Java Future containing the result of the ResumeCluster operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • InsufficientClusterCapacityException The number of nodes specified exceeds the allotted capacity of * the cluster.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.ResumeCluster * @see AWS API * Documentation */ @Override public CompletableFuture resumeCluster(ResumeClusterRequest resumeClusterRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(resumeClusterRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, resumeClusterRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ResumeCluster"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(ResumeClusterResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ResumeCluster").withProtocolMetadata(protocolMetadata) .withMarshaller(new ResumeClusterRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(resumeClusterRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Revokes an ingress rule in an Amazon Redshift security group for a previously authorized IP range or Amazon EC2 * security group. To add an ingress rule, see AuthorizeClusterSecurityGroupIngress. For information about * managing security groups, go to Amazon Redshift Cluster * Security Groups in the Amazon Redshift Cluster Management Guide. *

* * @param revokeClusterSecurityGroupIngressRequest * @return A Java Future containing the result of the RevokeClusterSecurityGroupIngress operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterSecurityGroupNotFoundException The cluster security group name does not refer to an existing * cluster security group.
  • *
  • AuthorizationNotFoundException The specified CIDR IP range or EC2 security group is not authorized * for the specified cluster security group.
  • *
  • InvalidClusterSecurityGroupStateException The state of the cluster security group is not * available.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.RevokeClusterSecurityGroupIngress * @see AWS API Documentation */ @Override public CompletableFuture revokeClusterSecurityGroupIngress( RevokeClusterSecurityGroupIngressRequest revokeClusterSecurityGroupIngressRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(revokeClusterSecurityGroupIngressRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, revokeClusterSecurityGroupIngressRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RevokeClusterSecurityGroupIngress"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RevokeClusterSecurityGroupIngressResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RevokeClusterSecurityGroupIngress").withProtocolMetadata(protocolMetadata) .withMarshaller(new RevokeClusterSecurityGroupIngressRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(revokeClusterSecurityGroupIngressRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Revokes access to a cluster. *

* * @param revokeEndpointAccessRequest * @return A Java Future containing the result of the RevokeEndpointAccess operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • InvalidEndpointStateException The status of the endpoint is not valid.
  • *
  • InvalidClusterSecurityGroupStateException The state of the cluster security group is not * available.
  • *
  • EndpointNotFoundException The endpoint name doesn't refer to an existing endpoint.
  • *
  • EndpointAuthorizationNotFoundException The authorization for this endpoint can't be found.
  • *
  • InvalidAuthorizationStateException The status of the authorization is not valid.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.RevokeEndpointAccess * @see AWS * API Documentation */ @Override public CompletableFuture revokeEndpointAccess( RevokeEndpointAccessRequest revokeEndpointAccessRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(revokeEndpointAccessRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, revokeEndpointAccessRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RevokeEndpointAccess"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RevokeEndpointAccessResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RevokeEndpointAccess").withProtocolMetadata(protocolMetadata) .withMarshaller(new RevokeEndpointAccessRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(revokeEndpointAccessRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes the ability of the specified Amazon Web Services account to restore the specified snapshot. If the * account is currently restoring the snapshot, the restore will run to completion. *

*

* For more information about working with snapshots, go to Amazon Redshift Snapshots * in the Amazon Redshift Cluster Management Guide. *

* * @param revokeSnapshotAccessRequest * @return A Java Future containing the result of the RevokeSnapshotAccess operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • AccessToSnapshotDeniedException The owner of the specified snapshot has not authorized your account * to access the snapshot.
  • *
  • AuthorizationNotFoundException The specified CIDR IP range or EC2 security group is not authorized * for the specified cluster security group.
  • *
  • ClusterSnapshotNotFoundException The snapshot identifier does not refer to an existing cluster * snapshot.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.RevokeSnapshotAccess * @see AWS * API Documentation */ @Override public CompletableFuture revokeSnapshotAccess( RevokeSnapshotAccessRequest revokeSnapshotAccessRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(revokeSnapshotAccessRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, revokeSnapshotAccessRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RevokeSnapshotAccess"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RevokeSnapshotAccessResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RevokeSnapshotAccess").withProtocolMetadata(protocolMetadata) .withMarshaller(new RevokeSnapshotAccessRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(revokeSnapshotAccessRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Rotates the encryption keys for a cluster. *

* * @param rotateEncryptionKeyRequest * @return A Java Future containing the result of the RotateEncryptionKey operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • InvalidClusterStateException The specified cluster is not in the available state.
  • *
  • DependentServiceRequestThrottlingException The request cannot be completed because a dependent * service is throttling requests made by Amazon Redshift on your behalf. Wait and retry the request.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.RotateEncryptionKey * @see AWS * API Documentation */ @Override public CompletableFuture rotateEncryptionKey( RotateEncryptionKeyRequest rotateEncryptionKeyRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(rotateEncryptionKeyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, rotateEncryptionKeyRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RotateEncryptionKey"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(RotateEncryptionKeyResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RotateEncryptionKey").withProtocolMetadata(protocolMetadata) .withMarshaller(new RotateEncryptionKeyRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(rotateEncryptionKeyRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates the status of a partner integration. *

* * @param updatePartnerStatusRequest * @return A Java Future containing the result of the UpdatePartnerStatus operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. The exception returned is wrapped with CompletionException, so you need to invoke * {@link Throwable#getCause} to retrieve the underlying exception. *
    *
  • PartnerNotFoundException The name of the partner was not found.
  • *
  • ClusterNotFoundException The ClusterIdentifier parameter does not refer to an existing * cluster.
  • *
  • UnauthorizedPartnerIntegrationException The partner integration is not authorized.
  • *
  • UnsupportedOperationException The requested operation isn't supported.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • RedshiftException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftAsyncClient.UpdatePartnerStatus * @see AWS * API Documentation */ @Override public CompletableFuture updatePartnerStatus( UpdatePartnerStatusRequest updatePartnerStatusRequest) { SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updatePartnerStatusRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updatePartnerStatusRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdatePartnerStatus"); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(UpdatePartnerStatusResponse::builder); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdatePartnerStatus").withProtocolMetadata(protocolMetadata) .withMarshaller(new UpdatePartnerStatusRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector) .withInput(updatePartnerStatusRequest)); CompletableFuture whenCompleteFuture = null; whenCompleteFuture = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); return CompletableFutureUtils.forwardExceptionTo(whenCompleteFuture, executeFuture); } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } @Override public RedshiftAsyncWaiter waiter() { return RedshiftAsyncWaiter.builder().client(this).scheduledExecutorService(executorService).build(); } @Override public final RedshiftServiceClientConfiguration serviceClientConfiguration() { return new RedshiftServiceClientConfigurationBuilder(this.clientConfiguration.toBuilder()).build(); } @Override public final String serviceName() { return SERVICE_NAME; } private AwsQueryProtocolFactory init() { return AwsQueryProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidHsmConfigurationStateFault") .exceptionBuilderSupplier(InvalidHsmConfigurationStateException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SnapshotScheduleAlreadyExists") .exceptionBuilderSupplier(SnapshotScheduleAlreadyExistsException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SnapshotScheduleQuotaExceeded") .exceptionBuilderSupplier(SnapshotScheduleQuotaExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidSubscriptionStateFault") .exceptionBuilderSupplier(InvalidSubscriptionStateException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("UnauthorizedPartnerIntegration") .exceptionBuilderSupplier(UnauthorizedPartnerIntegrationException::builder).httpStatusCode(401) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidUsageLimit") .exceptionBuilderSupplier(InvalidUsageLimitException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("IntegrationNotFoundFault") .exceptionBuilderSupplier(IntegrationNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidRestore") .exceptionBuilderSupplier(InvalidRestoreException::builder).httpStatusCode(406).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SnapshotCopyDisabledFault") .exceptionBuilderSupplier(SnapshotCopyDisabledException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ReservedNodeExchangeNotFond") .exceptionBuilderSupplier(ReservedNodeExchangeNotFoundException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("RedshiftIdcApplicationQuotaExceeded") .exceptionBuilderSupplier(RedshiftIdcApplicationQuotaExceededException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ClusterSubnetGroupQuotaExceeded") .exceptionBuilderSupplier(ClusterSubnetGroupQuotaExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("Ipv6CidrBlockNotFoundFault") .exceptionBuilderSupplier(Ipv6CidrBlockNotFoundException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidSchedule") .exceptionBuilderSupplier(InvalidScheduleException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DependentServiceRequestThrottlingFault") .exceptionBuilderSupplier(DependentServiceRequestThrottlingException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidVPCNetworkStateFault") .exceptionBuilderSupplier(InvalidVpcNetworkStateException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("RedshiftIdcApplicationNotExists") .exceptionBuilderSupplier(RedshiftIdcApplicationNotExistsException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("BucketNotFoundFault") .exceptionBuilderSupplier(BucketNotFoundException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("LimitExceededFault") .exceptionBuilderSupplier(LimitExceededException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("EndpointAlreadyExists") .exceptionBuilderSupplier(EndpointAlreadyExistsException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("PartnerNotFound") .exceptionBuilderSupplier(PartnerNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ScheduledActionQuotaExceeded") .exceptionBuilderSupplier(ScheduledActionQuotaExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidTableRestoreArgument") .exceptionBuilderSupplier(InvalidTableRestoreArgumentException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SnapshotCopyGrantAlreadyExistsFault") .exceptionBuilderSupplier(SnapshotCopyGrantAlreadyExistsException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SnapshotCopyGrantQuotaExceededFault") .exceptionBuilderSupplier(SnapshotCopyGrantQuotaExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ClusterNotFound") .exceptionBuilderSupplier(ClusterNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ClusterQuotaExceeded") .exceptionBuilderSupplier(ClusterQuotaExceededException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("UnsupportedOperation") .exceptionBuilderSupplier(UnsupportedOperationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ScheduledActionAlreadyExists") .exceptionBuilderSupplier(ScheduledActionAlreadyExistsException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidClusterState") .exceptionBuilderSupplier(InvalidClusterStateException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ClusterSubnetQuotaExceededFault") .exceptionBuilderSupplier(ClusterSubnetQuotaExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidClusterParameterGroupState") .exceptionBuilderSupplier(InvalidClusterParameterGroupStateException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ClusterSubnetGroupNotFoundFault") .exceptionBuilderSupplier(ClusterSubnetGroupNotFoundException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SnapshotCopyAlreadyDisabledFault") .exceptionBuilderSupplier(SnapshotCopyAlreadyDisabledException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ClusterSnapshotQuotaExceeded") .exceptionBuilderSupplier(ClusterSnapshotQuotaExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DependentServiceAccessDenied") .exceptionBuilderSupplier(DependentServiceAccessDeniedException::builder).httpStatusCode(403) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("EndpointAuthorizationAlreadyExists") .exceptionBuilderSupplier(EndpointAuthorizationAlreadyExistsException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ClusterAlreadyExists") .exceptionBuilderSupplier(ClusterAlreadyExistsException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ConflictPolicyUpdateFault") .exceptionBuilderSupplier(ConflictPolicyUpdateException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SNSTopicArnNotFound") .exceptionBuilderSupplier(SnsTopicArnNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NumberOfNodesQuotaExceeded") .exceptionBuilderSupplier(NumberOfNodesQuotaExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ClusterSecurityGroupAlreadyExists") .exceptionBuilderSupplier(ClusterSecurityGroupAlreadyExistsException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AuthorizationQuotaExceeded") .exceptionBuilderSupplier(AuthorizationQuotaExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ReservedNodeOfferingNotFound") .exceptionBuilderSupplier(ReservedNodeOfferingNotFoundException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("EndpointNotFound") .exceptionBuilderSupplier(EndpointNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InProgressTableRestoreQuotaExceededFault") .exceptionBuilderSupplier(InProgressTableRestoreQuotaExceededException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AccessToSnapshotDenied") .exceptionBuilderSupplier(AccessToSnapshotDeniedException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidElasticIpFault") .exceptionBuilderSupplier(InvalidElasticIpException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResizeNotFound") .exceptionBuilderSupplier(ResizeNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ScheduleDefinitionTypeUnsupported") .exceptionBuilderSupplier(ScheduleDefinitionTypeUnsupportedException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidTagFault") .exceptionBuilderSupplier(InvalidTagException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("HsmClientCertificateAlreadyExistsFault") .exceptionBuilderSupplier(HsmClientCertificateAlreadyExistsException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ScheduledActionTypeUnsupported") .exceptionBuilderSupplier(ScheduledActionTypeUnsupportedException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ClusterParameterGroupQuotaExceeded") .exceptionBuilderSupplier(ClusterParameterGroupQuotaExceededException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidPolicyFault") .exceptionBuilderSupplier(InvalidPolicyException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("UnauthorizedOperation") .exceptionBuilderSupplier(UnauthorizedOperationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AuthenticationProfileNotFoundFault") .exceptionBuilderSupplier(AuthenticationProfileNotFoundException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SnapshotScheduleNotFound") .exceptionBuilderSupplier(SnapshotScheduleNotFoundException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ReservedNodeAlreadyExists") .exceptionBuilderSupplier(ReservedNodeAlreadyExistsException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidS3BucketNameFault") .exceptionBuilderSupplier(InvalidS3BucketNameException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("UnsupportedOptionFault") .exceptionBuilderSupplier(UnsupportedOptionException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InsufficientClusterCapacity") .exceptionBuilderSupplier(InsufficientClusterCapacityException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ClusterSubnetGroupAlreadyExists") .exceptionBuilderSupplier(ClusterSubnetGroupAlreadyExistsException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TagLimitExceededFault") .exceptionBuilderSupplier(TagLimitExceededException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidClusterSnapshotState") .exceptionBuilderSupplier(InvalidClusterSnapshotStateException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InsufficientS3BucketPolicyFault") .exceptionBuilderSupplier(InsufficientS3BucketPolicyException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("BatchDeleteRequestSizeExceeded") .exceptionBuilderSupplier(BatchDeleteRequestSizeExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidS3KeyPrefixFault") .exceptionBuilderSupplier(InvalidS3KeyPrefixException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AuthorizationNotFound") .exceptionBuilderSupplier(AuthorizationNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ScheduledActionNotFound") .exceptionBuilderSupplier(ScheduledActionNotFoundException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SubscriptionEventIdNotFound") .exceptionBuilderSupplier(SubscriptionEventIdNotFoundException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidClusterSnapshotScheduleState") .exceptionBuilderSupplier(InvalidClusterSnapshotScheduleStateException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("EndpointAuthorizationNotFound") .exceptionBuilderSupplier(EndpointAuthorizationNotFoundException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidClusterTrack") .exceptionBuilderSupplier(InvalidClusterTrackException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SubscriptionSeverityNotFound") .exceptionBuilderSupplier(SubscriptionSeverityNotFoundException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidNamespaceFault") .exceptionBuilderSupplier(InvalidNamespaceException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AccessToClusterDenied") .exceptionBuilderSupplier(AccessToClusterDeniedException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("CopyToRegionDisabledFault") .exceptionBuilderSupplier(CopyToRegionDisabledException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SubscriptionCategoryNotFound") .exceptionBuilderSupplier(SubscriptionCategoryNotFoundException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidEndpointState") .exceptionBuilderSupplier(InvalidEndpointStateException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("UnknownSnapshotCopyRegionFault") .exceptionBuilderSupplier(UnknownSnapshotCopyRegionException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TableRestoreNotFoundFault") .exceptionBuilderSupplier(TableRestoreNotFoundException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceNotFoundFault") .exceptionBuilderSupplier(ResourceNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("HsmConfigurationQuotaExceededFault") .exceptionBuilderSupplier(HsmConfigurationQuotaExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SnapshotCopyGrantNotFoundFault") .exceptionBuilderSupplier(SnapshotCopyGrantNotFoundException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ReservedNodeAlreadyMigrated") .exceptionBuilderSupplier(ReservedNodeAlreadyMigratedException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("HsmClientCertificateNotFoundFault") .exceptionBuilderSupplier(HsmClientCertificateNotFoundException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SnapshotCopyAlreadyEnabledFault") .exceptionBuilderSupplier(SnapshotCopyAlreadyEnabledException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("HsmConfigurationAlreadyExistsFault") .exceptionBuilderSupplier(HsmConfigurationAlreadyExistsException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("CustomCnameAssociationFault") .exceptionBuilderSupplier(CustomCnameAssociationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SubscriptionNotFound") .exceptionBuilderSupplier(SubscriptionNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidReservedNodeState") .exceptionBuilderSupplier(InvalidReservedNodeStateException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("CustomDomainAssociationNotFoundFault") .exceptionBuilderSupplier(CustomDomainAssociationNotFoundException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SubnetAlreadyInUse") .exceptionBuilderSupplier(SubnetAlreadyInUseException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DependentServiceUnavailableFault") .exceptionBuilderSupplier(DependentServiceUnavailableException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidAuthorizationState") .exceptionBuilderSupplier(InvalidAuthorizationStateException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ClusterSecurityGroupNotFound") .exceptionBuilderSupplier(ClusterSecurityGroupNotFoundException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidSubnet") .exceptionBuilderSupplier(InvalidSubnetException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("HsmConfigurationNotFoundFault") .exceptionBuilderSupplier(HsmConfigurationNotFoundException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NumberOfNodesPerClusterLimitExceeded") .exceptionBuilderSupplier(NumberOfNodesPerClusterLimitExceededException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AuthenticationProfileQuotaExceededFault") .exceptionBuilderSupplier(AuthenticationProfileQuotaExceededException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("EndpointAuthorizationsPerClusterLimitExceeded") .exceptionBuilderSupplier(EndpointAuthorizationsPerClusterLimitExceededException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ClusterSnapshotAlreadyExists") .exceptionBuilderSupplier(ClusterSnapshotAlreadyExistsException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidRetentionPeriodFault") .exceptionBuilderSupplier(InvalidRetentionPeriodException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AuthenticationProfileAlreadyExistsFault") .exceptionBuilderSupplier(AuthenticationProfileAlreadyExistsException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("EndpointsPerAuthorizationLimitExceeded") .exceptionBuilderSupplier(EndpointsPerAuthorizationLimitExceededException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("UsageLimitNotFound") .exceptionBuilderSupplier(UsageLimitNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TableLimitExceeded") .exceptionBuilderSupplier(TableLimitExceededException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SnapshotScheduleUpdateInProgress") .exceptionBuilderSupplier(SnapshotScheduleUpdateInProgressException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidSnapshotCopyGrantStateFault") .exceptionBuilderSupplier(InvalidSnapshotCopyGrantStateException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SNSInvalidTopic") .exceptionBuilderSupplier(SnsInvalidTopicException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidHsmClientCertificateStateFault") .exceptionBuilderSupplier(InvalidHsmClientCertificateStateException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidClusterSubnetGroupStateFault") .exceptionBuilderSupplier(InvalidClusterSubnetGroupStateException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ClusterOnLatestRevision") .exceptionBuilderSupplier(ClusterOnLatestRevisionException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ClusterSnapshotNotFound") .exceptionBuilderSupplier(ClusterSnapshotNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidDataShareFault") .exceptionBuilderSupplier(InvalidDataShareException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("BatchModifyClusterSnapshotsLimitExceededFault") .exceptionBuilderSupplier(BatchModifyClusterSnapshotsLimitExceededException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("HsmClientCertificateQuotaExceededFault") .exceptionBuilderSupplier(HsmClientCertificateQuotaExceededException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidClusterSecurityGroupState") .exceptionBuilderSupplier(InvalidClusterSecurityGroupStateException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ReservedNodeQuotaExceeded") .exceptionBuilderSupplier(ReservedNodeQuotaExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidAuthenticationProfileRequestFault") .exceptionBuilderSupplier(InvalidAuthenticationProfileRequestException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SNSNoAuthorization") .exceptionBuilderSupplier(SnsNoAuthorizationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidClusterSubnetStateFault") .exceptionBuilderSupplier(InvalidClusterSubnetStateException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SubscriptionAlreadyExist") .exceptionBuilderSupplier(SubscriptionAlreadyExistException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ReservedNodeNotFound") .exceptionBuilderSupplier(ReservedNodeNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidScheduledAction") .exceptionBuilderSupplier(InvalidScheduledActionException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("IncompatibleOrderableOptions") .exceptionBuilderSupplier(IncompatibleOrderableOptionsException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("RedshiftIdcApplicationAlreadyExists") .exceptionBuilderSupplier(RedshiftIdcApplicationAlreadyExistsException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("EndpointsPerClusterLimitExceeded") .exceptionBuilderSupplier(EndpointsPerClusterLimitExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("UsageLimitAlreadyExists") .exceptionBuilderSupplier(UsageLimitAlreadyExistsException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SourceNotFound") .exceptionBuilderSupplier(SourceNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ClusterParameterGroupNotFound") .exceptionBuilderSupplier(ClusterParameterGroupNotFoundException::builder).httpStatusCode(404) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("QuotaExceeded.ClusterSecurityGroup") .exceptionBuilderSupplier(ClusterSecurityGroupQuotaExceededException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("EventSubscriptionQuotaExceeded") .exceptionBuilderSupplier(EventSubscriptionQuotaExceededException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AuthorizationAlreadyExists") .exceptionBuilderSupplier(AuthorizationAlreadyExistsException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ClusterParameterGroupAlreadyExists") .exceptionBuilderSupplier(ClusterParameterGroupAlreadyExistsException::builder) .httpStatusCode(400).build()).clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(RedshiftException::builder).build(); } private static List resolveMetricPublishers(SdkClientConfiguration clientConfiguration, RequestOverrideConfiguration requestOverrideConfiguration) { List publishers = null; if (requestOverrideConfiguration != null) { publishers = requestOverrideConfiguration.metricPublishers(); } if (publishers == null || publishers.isEmpty()) { publishers = clientConfiguration.option(SdkClientOption.METRIC_PUBLISHERS); } if (publishers == null) { publishers = Collections.emptyList(); } return publishers; } private void updateRetryStrategyClientConfiguration(SdkClientConfiguration.Builder configuration) { ClientOverrideConfiguration.Builder builder = configuration.asOverrideConfigurationBuilder(); RetryMode retryMode = builder.retryMode(); if (retryMode != null) { configuration.option(SdkClientOption.RETRY_STRATEGY, AwsRetryStrategy.forRetryMode(retryMode)); } else { Consumer> configurator = builder.retryStrategyConfigurator(); if (configurator != null) { RetryStrategy.Builder defaultBuilder = AwsRetryStrategy.defaultRetryStrategy().toBuilder(); configurator.accept(defaultBuilder); configuration.option(SdkClientOption.RETRY_STRATEGY, defaultBuilder.build()); } else { RetryStrategy retryStrategy = builder.retryStrategy(); if (retryStrategy != null) { configuration.option(SdkClientOption.RETRY_STRATEGY, retryStrategy); } } } configuration.option(SdkClientOption.CONFIGURED_RETRY_MODE, null); configuration.option(SdkClientOption.CONFIGURED_RETRY_STRATEGY, null); configuration.option(SdkClientOption.CONFIGURED_RETRY_CONFIGURATOR, null); } private SdkClientConfiguration updateSdkClientConfiguration(SdkRequest request, SdkClientConfiguration clientConfiguration) { List plugins = request.overrideConfiguration().map(c -> c.plugins()).orElse(Collections.emptyList()); SdkClientConfiguration.Builder configuration = clientConfiguration.toBuilder(); if (plugins.isEmpty()) { return configuration.build(); } RedshiftServiceClientConfigurationBuilder serviceConfigBuilder = new RedshiftServiceClientConfigurationBuilder( configuration); for (SdkPlugin plugin : plugins) { plugin.configureClient(serviceConfigBuilder); } updateRetryStrategyClientConfiguration(configuration); return configuration.build(); } @Override public void close() { clientHandler.close(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy