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

software.amazon.awssdk.services.redshiftserverless.DefaultRedshiftServerlessClient Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.30.1
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.redshiftserverless;

import java.util.Collections;
import java.util.List;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
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.ClientExecutionParams;
import software.amazon.awssdk.core.client.handler.SyncClientHandler;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.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.json.AwsJsonProtocol;
import software.amazon.awssdk.protocols.json.AwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.JsonOperationMetadata;
import software.amazon.awssdk.retries.api.RetryStrategy;
import software.amazon.awssdk.services.redshiftserverless.internal.RedshiftServerlessServiceClientConfigurationBuilder;
import software.amazon.awssdk.services.redshiftserverless.model.AccessDeniedException;
import software.amazon.awssdk.services.redshiftserverless.model.ConflictException;
import software.amazon.awssdk.services.redshiftserverless.model.ConvertRecoveryPointToSnapshotRequest;
import software.amazon.awssdk.services.redshiftserverless.model.ConvertRecoveryPointToSnapshotResponse;
import software.amazon.awssdk.services.redshiftserverless.model.CreateCustomDomainAssociationRequest;
import software.amazon.awssdk.services.redshiftserverless.model.CreateCustomDomainAssociationResponse;
import software.amazon.awssdk.services.redshiftserverless.model.CreateEndpointAccessRequest;
import software.amazon.awssdk.services.redshiftserverless.model.CreateEndpointAccessResponse;
import software.amazon.awssdk.services.redshiftserverless.model.CreateNamespaceRequest;
import software.amazon.awssdk.services.redshiftserverless.model.CreateNamespaceResponse;
import software.amazon.awssdk.services.redshiftserverless.model.CreateScheduledActionRequest;
import software.amazon.awssdk.services.redshiftserverless.model.CreateScheduledActionResponse;
import software.amazon.awssdk.services.redshiftserverless.model.CreateSnapshotCopyConfigurationRequest;
import software.amazon.awssdk.services.redshiftserverless.model.CreateSnapshotCopyConfigurationResponse;
import software.amazon.awssdk.services.redshiftserverless.model.CreateSnapshotRequest;
import software.amazon.awssdk.services.redshiftserverless.model.CreateSnapshotResponse;
import software.amazon.awssdk.services.redshiftserverless.model.CreateUsageLimitRequest;
import software.amazon.awssdk.services.redshiftserverless.model.CreateUsageLimitResponse;
import software.amazon.awssdk.services.redshiftserverless.model.CreateWorkgroupRequest;
import software.amazon.awssdk.services.redshiftserverless.model.CreateWorkgroupResponse;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteCustomDomainAssociationRequest;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteCustomDomainAssociationResponse;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteEndpointAccessRequest;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteEndpointAccessResponse;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteNamespaceRequest;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteNamespaceResponse;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteResourcePolicyRequest;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteResourcePolicyResponse;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteScheduledActionRequest;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteScheduledActionResponse;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteSnapshotCopyConfigurationRequest;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteSnapshotCopyConfigurationResponse;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteSnapshotRequest;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteSnapshotResponse;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteUsageLimitRequest;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteUsageLimitResponse;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteWorkgroupRequest;
import software.amazon.awssdk.services.redshiftserverless.model.DeleteWorkgroupResponse;
import software.amazon.awssdk.services.redshiftserverless.model.GetCredentialsRequest;
import software.amazon.awssdk.services.redshiftserverless.model.GetCredentialsResponse;
import software.amazon.awssdk.services.redshiftserverless.model.GetCustomDomainAssociationRequest;
import software.amazon.awssdk.services.redshiftserverless.model.GetCustomDomainAssociationResponse;
import software.amazon.awssdk.services.redshiftserverless.model.GetEndpointAccessRequest;
import software.amazon.awssdk.services.redshiftserverless.model.GetEndpointAccessResponse;
import software.amazon.awssdk.services.redshiftserverless.model.GetNamespaceRequest;
import software.amazon.awssdk.services.redshiftserverless.model.GetNamespaceResponse;
import software.amazon.awssdk.services.redshiftserverless.model.GetRecoveryPointRequest;
import software.amazon.awssdk.services.redshiftserverless.model.GetRecoveryPointResponse;
import software.amazon.awssdk.services.redshiftserverless.model.GetResourcePolicyRequest;
import software.amazon.awssdk.services.redshiftserverless.model.GetResourcePolicyResponse;
import software.amazon.awssdk.services.redshiftserverless.model.GetScheduledActionRequest;
import software.amazon.awssdk.services.redshiftserverless.model.GetScheduledActionResponse;
import software.amazon.awssdk.services.redshiftserverless.model.GetSnapshotRequest;
import software.amazon.awssdk.services.redshiftserverless.model.GetSnapshotResponse;
import software.amazon.awssdk.services.redshiftserverless.model.GetTableRestoreStatusRequest;
import software.amazon.awssdk.services.redshiftserverless.model.GetTableRestoreStatusResponse;
import software.amazon.awssdk.services.redshiftserverless.model.GetUsageLimitRequest;
import software.amazon.awssdk.services.redshiftserverless.model.GetUsageLimitResponse;
import software.amazon.awssdk.services.redshiftserverless.model.GetWorkgroupRequest;
import software.amazon.awssdk.services.redshiftserverless.model.GetWorkgroupResponse;
import software.amazon.awssdk.services.redshiftserverless.model.InsufficientCapacityException;
import software.amazon.awssdk.services.redshiftserverless.model.InternalServerException;
import software.amazon.awssdk.services.redshiftserverless.model.InvalidPaginationException;
import software.amazon.awssdk.services.redshiftserverless.model.Ipv6CidrBlockNotFoundException;
import software.amazon.awssdk.services.redshiftserverless.model.ListCustomDomainAssociationsRequest;
import software.amazon.awssdk.services.redshiftserverless.model.ListCustomDomainAssociationsResponse;
import software.amazon.awssdk.services.redshiftserverless.model.ListEndpointAccessRequest;
import software.amazon.awssdk.services.redshiftserverless.model.ListEndpointAccessResponse;
import software.amazon.awssdk.services.redshiftserverless.model.ListNamespacesRequest;
import software.amazon.awssdk.services.redshiftserverless.model.ListNamespacesResponse;
import software.amazon.awssdk.services.redshiftserverless.model.ListRecoveryPointsRequest;
import software.amazon.awssdk.services.redshiftserverless.model.ListRecoveryPointsResponse;
import software.amazon.awssdk.services.redshiftserverless.model.ListScheduledActionsRequest;
import software.amazon.awssdk.services.redshiftserverless.model.ListScheduledActionsResponse;
import software.amazon.awssdk.services.redshiftserverless.model.ListSnapshotCopyConfigurationsRequest;
import software.amazon.awssdk.services.redshiftserverless.model.ListSnapshotCopyConfigurationsResponse;
import software.amazon.awssdk.services.redshiftserverless.model.ListSnapshotsRequest;
import software.amazon.awssdk.services.redshiftserverless.model.ListSnapshotsResponse;
import software.amazon.awssdk.services.redshiftserverless.model.ListTableRestoreStatusRequest;
import software.amazon.awssdk.services.redshiftserverless.model.ListTableRestoreStatusResponse;
import software.amazon.awssdk.services.redshiftserverless.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.redshiftserverless.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.redshiftserverless.model.ListUsageLimitsRequest;
import software.amazon.awssdk.services.redshiftserverless.model.ListUsageLimitsResponse;
import software.amazon.awssdk.services.redshiftserverless.model.ListWorkgroupsRequest;
import software.amazon.awssdk.services.redshiftserverless.model.ListWorkgroupsResponse;
import software.amazon.awssdk.services.redshiftserverless.model.PutResourcePolicyRequest;
import software.amazon.awssdk.services.redshiftserverless.model.PutResourcePolicyResponse;
import software.amazon.awssdk.services.redshiftserverless.model.RedshiftServerlessException;
import software.amazon.awssdk.services.redshiftserverless.model.ResourceNotFoundException;
import software.amazon.awssdk.services.redshiftserverless.model.RestoreFromRecoveryPointRequest;
import software.amazon.awssdk.services.redshiftserverless.model.RestoreFromRecoveryPointResponse;
import software.amazon.awssdk.services.redshiftserverless.model.RestoreFromSnapshotRequest;
import software.amazon.awssdk.services.redshiftserverless.model.RestoreFromSnapshotResponse;
import software.amazon.awssdk.services.redshiftserverless.model.RestoreTableFromRecoveryPointRequest;
import software.amazon.awssdk.services.redshiftserverless.model.RestoreTableFromRecoveryPointResponse;
import software.amazon.awssdk.services.redshiftserverless.model.RestoreTableFromSnapshotRequest;
import software.amazon.awssdk.services.redshiftserverless.model.RestoreTableFromSnapshotResponse;
import software.amazon.awssdk.services.redshiftserverless.model.ServiceQuotaExceededException;
import software.amazon.awssdk.services.redshiftserverless.model.TagResourceRequest;
import software.amazon.awssdk.services.redshiftserverless.model.TagResourceResponse;
import software.amazon.awssdk.services.redshiftserverless.model.ThrottlingException;
import software.amazon.awssdk.services.redshiftserverless.model.TooManyTagsException;
import software.amazon.awssdk.services.redshiftserverless.model.UntagResourceRequest;
import software.amazon.awssdk.services.redshiftserverless.model.UntagResourceResponse;
import software.amazon.awssdk.services.redshiftserverless.model.UpdateCustomDomainAssociationRequest;
import software.amazon.awssdk.services.redshiftserverless.model.UpdateCustomDomainAssociationResponse;
import software.amazon.awssdk.services.redshiftserverless.model.UpdateEndpointAccessRequest;
import software.amazon.awssdk.services.redshiftserverless.model.UpdateEndpointAccessResponse;
import software.amazon.awssdk.services.redshiftserverless.model.UpdateNamespaceRequest;
import software.amazon.awssdk.services.redshiftserverless.model.UpdateNamespaceResponse;
import software.amazon.awssdk.services.redshiftserverless.model.UpdateScheduledActionRequest;
import software.amazon.awssdk.services.redshiftserverless.model.UpdateScheduledActionResponse;
import software.amazon.awssdk.services.redshiftserverless.model.UpdateSnapshotCopyConfigurationRequest;
import software.amazon.awssdk.services.redshiftserverless.model.UpdateSnapshotCopyConfigurationResponse;
import software.amazon.awssdk.services.redshiftserverless.model.UpdateSnapshotRequest;
import software.amazon.awssdk.services.redshiftserverless.model.UpdateSnapshotResponse;
import software.amazon.awssdk.services.redshiftserverless.model.UpdateUsageLimitRequest;
import software.amazon.awssdk.services.redshiftserverless.model.UpdateUsageLimitResponse;
import software.amazon.awssdk.services.redshiftserverless.model.UpdateWorkgroupRequest;
import software.amazon.awssdk.services.redshiftserverless.model.UpdateWorkgroupResponse;
import software.amazon.awssdk.services.redshiftserverless.model.ValidationException;
import software.amazon.awssdk.services.redshiftserverless.transform.ConvertRecoveryPointToSnapshotRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.CreateCustomDomainAssociationRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.CreateEndpointAccessRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.CreateNamespaceRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.CreateScheduledActionRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.CreateSnapshotCopyConfigurationRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.CreateSnapshotRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.CreateUsageLimitRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.CreateWorkgroupRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.DeleteCustomDomainAssociationRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.DeleteEndpointAccessRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.DeleteNamespaceRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.DeleteResourcePolicyRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.DeleteScheduledActionRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.DeleteSnapshotCopyConfigurationRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.DeleteSnapshotRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.DeleteUsageLimitRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.DeleteWorkgroupRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.GetCredentialsRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.GetCustomDomainAssociationRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.GetEndpointAccessRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.GetNamespaceRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.GetRecoveryPointRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.GetResourcePolicyRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.GetScheduledActionRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.GetSnapshotRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.GetTableRestoreStatusRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.GetUsageLimitRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.GetWorkgroupRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.ListCustomDomainAssociationsRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.ListEndpointAccessRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.ListNamespacesRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.ListRecoveryPointsRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.ListScheduledActionsRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.ListSnapshotCopyConfigurationsRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.ListSnapshotsRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.ListTableRestoreStatusRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.ListUsageLimitsRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.ListWorkgroupsRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.PutResourcePolicyRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.RestoreFromRecoveryPointRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.RestoreFromSnapshotRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.RestoreTableFromRecoveryPointRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.RestoreTableFromSnapshotRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.UpdateCustomDomainAssociationRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.UpdateEndpointAccessRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.UpdateNamespaceRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.UpdateScheduledActionRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.UpdateSnapshotCopyConfigurationRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.UpdateSnapshotRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.UpdateUsageLimitRequestMarshaller;
import software.amazon.awssdk.services.redshiftserverless.transform.UpdateWorkgroupRequestMarshaller;
import software.amazon.awssdk.utils.Logger;

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

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

    private final SyncClientHandler clientHandler;

    private final AwsJsonProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

    protected DefaultRedshiftServerlessClient(SdkClientConfiguration clientConfiguration) {
        this.clientHandler = new AwsSyncClientHandler(clientConfiguration);
        this.clientConfiguration = clientConfiguration.toBuilder().option(SdkClientOption.SDK_CLIENT, this).build();
        this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
    }

    /**
     * 

* Converts a recovery point to a snapshot. For more information about recovery points and snapshots, see Working with snapshots * and recovery points. *

* * @param convertRecoveryPointToSnapshotRequest * @return Result of the ConvertRecoveryPointToSnapshot operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws TooManyTagsException * The request exceeded the number of tags allowed for a resource. * @throws ServiceQuotaExceededException * The service limit was exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.ConvertRecoveryPointToSnapshot * @see AWS API Documentation */ @Override public ConvertRecoveryPointToSnapshotResponse convertRecoveryPointToSnapshot( ConvertRecoveryPointToSnapshotRequest convertRecoveryPointToSnapshotRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, TooManyTagsException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ConvertRecoveryPointToSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(convertRecoveryPointToSnapshotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, convertRecoveryPointToSnapshotRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ConvertRecoveryPointToSnapshot"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ConvertRecoveryPointToSnapshot").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(convertRecoveryPointToSnapshotRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ConvertRecoveryPointToSnapshotRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a custom domain association for Amazon Redshift Serverless. *

* * @param createCustomDomainAssociationRequest * @return Result of the CreateCustomDomainAssociation operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.CreateCustomDomainAssociation * @see AWS API Documentation */ @Override public CreateCustomDomainAssociationResponse createCustomDomainAssociation( CreateCustomDomainAssociationRequest createCustomDomainAssociationRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AccessDeniedException, ThrottlingException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateCustomDomainAssociationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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 Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateCustomDomainAssociation"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateCustomDomainAssociation").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createCustomDomainAssociationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateCustomDomainAssociationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates an Amazon Redshift Serverless managed VPC endpoint. *

* * @param createEndpointAccessRequest * @return Result of the CreateEndpointAccess operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ServiceQuotaExceededException * The service limit was exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.CreateEndpointAccess * @see AWS API Documentation */ @Override public CreateEndpointAccessResponse createEndpointAccess(CreateEndpointAccessRequest createEndpointAccessRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateEndpointAccessResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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 Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateEndpointAccess"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateEndpointAccess").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createEndpointAccessRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateEndpointAccessRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a namespace in Amazon Redshift Serverless. *

* * @param createNamespaceRequest * @return Result of the CreateNamespace operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws TooManyTagsException * The request exceeded the number of tags allowed for a resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.CreateNamespace * @see AWS API Documentation */ @Override public CreateNamespaceResponse createNamespace(CreateNamespaceRequest createNamespaceRequest) throws InternalServerException, ConflictException, ValidationException, TooManyTagsException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateNamespaceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createNamespaceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createNamespaceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateNamespace"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateNamespace").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createNamespaceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateNamespaceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 CreateSnapshot API operation. *

* * @param createScheduledActionRequest * @return Result of the CreateScheduledAction operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.CreateScheduledAction * @see AWS API Documentation */ @Override public CreateScheduledActionResponse createScheduledAction(CreateScheduledActionRequest createScheduledActionRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateScheduledActionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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 Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateScheduledAction"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateScheduledAction").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createScheduledActionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateScheduledActionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a snapshot of all databases in a namespace. For more information about snapshots, see Working with * snapshots and recovery points. *

* * @param createSnapshotRequest * @return Result of the CreateSnapshot operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws TooManyTagsException * The request exceeded the number of tags allowed for a resource. * @throws ServiceQuotaExceededException * The service limit was exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.CreateSnapshot * @see AWS API Documentation */ @Override public CreateSnapshotResponse createSnapshot(CreateSnapshotRequest createSnapshotRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, TooManyTagsException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createSnapshotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createSnapshotRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateSnapshot"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateSnapshot").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createSnapshotRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateSnapshotRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a snapshot copy configuration that lets you copy snapshots to another Amazon Web Services Region. *

* * @param createSnapshotCopyConfigurationRequest * @return Result of the CreateSnapshotCopyConfiguration operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ServiceQuotaExceededException * The service limit was exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.CreateSnapshotCopyConfiguration * @see AWS API Documentation */ @Override public CreateSnapshotCopyConfigurationResponse createSnapshotCopyConfiguration( CreateSnapshotCopyConfigurationRequest createSnapshotCopyConfigurationRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateSnapshotCopyConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createSnapshotCopyConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createSnapshotCopyConfigurationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateSnapshotCopyConfiguration"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateSnapshotCopyConfiguration").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createSnapshotCopyConfigurationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateSnapshotCopyConfigurationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a usage limit for a specified Amazon Redshift Serverless usage type. The usage limit is identified by the * returned usage limit identifier. *

* * @param createUsageLimitRequest * @return Result of the CreateUsageLimit operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws ServiceQuotaExceededException * The service limit was exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.CreateUsageLimit * @see AWS API Documentation */ @Override public CreateUsageLimitResponse createUsageLimit(CreateUsageLimitRequest createUsageLimitRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateUsageLimitResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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 Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateUsageLimit"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateUsageLimit").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createUsageLimitRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateUsageLimitRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates an workgroup in Amazon Redshift Serverless. *

* * @param createWorkgroupRequest * @return Result of the CreateWorkgroup operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws InsufficientCapacityException * There is an insufficient capacity to perform the action. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws TooManyTagsException * The request exceeded the number of tags allowed for a resource. * @throws 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. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.CreateWorkgroup * @see AWS API Documentation */ @Override public CreateWorkgroupResponse createWorkgroup(CreateWorkgroupRequest createWorkgroupRequest) throws InternalServerException, InsufficientCapacityException, ResourceNotFoundException, ConflictException, ValidationException, TooManyTagsException, Ipv6CidrBlockNotFoundException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateWorkgroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createWorkgroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createWorkgroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateWorkgroup"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateWorkgroup").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createWorkgroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateWorkgroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a custom domain association for Amazon Redshift Serverless. *

* * @param deleteCustomDomainAssociationRequest * @return Result of the DeleteCustomDomainAssociation operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.DeleteCustomDomainAssociation * @see AWS API Documentation */ @Override public DeleteCustomDomainAssociationResponse deleteCustomDomainAssociation( DeleteCustomDomainAssociationRequest deleteCustomDomainAssociationRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AccessDeniedException, ThrottlingException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteCustomDomainAssociationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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 Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteCustomDomainAssociation"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteCustomDomainAssociation").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteCustomDomainAssociationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteCustomDomainAssociationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes an Amazon Redshift Serverless managed VPC endpoint. *

* * @param deleteEndpointAccessRequest * @return Result of the DeleteEndpointAccess operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.DeleteEndpointAccess * @see AWS API Documentation */ @Override public DeleteEndpointAccessResponse deleteEndpointAccess(DeleteEndpointAccessRequest deleteEndpointAccessRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteEndpointAccessResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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 Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteEndpointAccess"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteEndpointAccess").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteEndpointAccessRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteEndpointAccessRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a namespace from Amazon Redshift Serverless. Before you delete the namespace, you can create a final * snapshot that has all of the data within the namespace. *

* * @param deleteNamespaceRequest * @return Result of the DeleteNamespace operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.DeleteNamespace * @see AWS API Documentation */ @Override public DeleteNamespaceResponse deleteNamespace(DeleteNamespaceRequest deleteNamespaceRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteNamespaceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteNamespaceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteNamespaceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteNamespace"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteNamespace").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteNamespaceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteNamespaceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes the specified resource policy. *

* * @param deleteResourcePolicyRequest * @return Result of the DeleteResourcePolicy operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.DeleteResourcePolicy * @see AWS API Documentation */ @Override public DeleteResourcePolicyResponse deleteResourcePolicy(DeleteResourcePolicyRequest deleteResourcePolicyRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteResourcePolicyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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 Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteResourcePolicy"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteResourcePolicy").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteResourcePolicyRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteResourcePolicyRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a scheduled action. *

* * @param deleteScheduledActionRequest * @return Result of the DeleteScheduledAction operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.DeleteScheduledAction * @see AWS API Documentation */ @Override public DeleteScheduledActionResponse deleteScheduledAction(DeleteScheduledActionRequest deleteScheduledActionRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteScheduledActionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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 Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteScheduledAction"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteScheduledAction").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteScheduledActionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteScheduledActionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a snapshot from Amazon Redshift Serverless. *

* * @param deleteSnapshotRequest * @return Result of the DeleteSnapshot operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.DeleteSnapshot * @see AWS API Documentation */ @Override public DeleteSnapshotResponse deleteSnapshot(DeleteSnapshotRequest deleteSnapshotRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteSnapshotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSnapshotRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSnapshot"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteSnapshot").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteSnapshotRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteSnapshotRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a snapshot copy configuration *

* * @param deleteSnapshotCopyConfigurationRequest * @return Result of the DeleteSnapshotCopyConfiguration operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.DeleteSnapshotCopyConfiguration * @see AWS API Documentation */ @Override public DeleteSnapshotCopyConfigurationResponse deleteSnapshotCopyConfiguration( DeleteSnapshotCopyConfigurationRequest deleteSnapshotCopyConfigurationRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteSnapshotCopyConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteSnapshotCopyConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteSnapshotCopyConfigurationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteSnapshotCopyConfiguration"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteSnapshotCopyConfiguration").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteSnapshotCopyConfigurationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteSnapshotCopyConfigurationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a usage limit from Amazon Redshift Serverless. *

* * @param deleteUsageLimitRequest * @return Result of the DeleteUsageLimit operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.DeleteUsageLimit * @see AWS API Documentation */ @Override public DeleteUsageLimitResponse deleteUsageLimit(DeleteUsageLimitRequest deleteUsageLimitRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteUsageLimitResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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 Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteUsageLimit"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteUsageLimit").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteUsageLimitRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteUsageLimitRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a workgroup. *

* * @param deleteWorkgroupRequest * @return Result of the DeleteWorkgroup operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.DeleteWorkgroup * @see AWS API Documentation */ @Override public DeleteWorkgroupResponse deleteWorkgroup(DeleteWorkgroupRequest deleteWorkgroupRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteWorkgroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteWorkgroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteWorkgroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteWorkgroup"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteWorkgroup").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteWorkgroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteWorkgroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a database user name and temporary password with temporary authorization to log in to Amazon Redshift * Serverless. *

*

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

* *
     *  <p>The Identity and Access Management (IAM) user or role that runs GetCredentials must have an IAM policy attached that allows access to all necessary actions and resources.</p> <p>If the <code>DbName</code> parameter is specified, the IAM policy must allow access to the resource dbname for the specified database name.</p> 
     * 
* * @param getCredentialsRequest * @return Result of the GetCredentials operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.GetCredentials * @see AWS API Documentation */ @Override public GetCredentialsResponse getCredentials(GetCredentialsRequest getCredentialsRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetCredentialsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCredentialsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getCredentialsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCredentials"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetCredentials").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getCredentialsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetCredentialsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about a specific custom domain association. *

* * @param getCustomDomainAssociationRequest * @return Result of the GetCustomDomainAssociation operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.GetCustomDomainAssociation * @see AWS API Documentation */ @Override public GetCustomDomainAssociationResponse getCustomDomainAssociation( GetCustomDomainAssociationRequest getCustomDomainAssociationRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AccessDeniedException, ThrottlingException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetCustomDomainAssociationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCustomDomainAssociationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getCustomDomainAssociationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCustomDomainAssociation"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetCustomDomainAssociation").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getCustomDomainAssociationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetCustomDomainAssociationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information, such as the name, about a VPC endpoint. *

* * @param getEndpointAccessRequest * @return Result of the GetEndpointAccess operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.GetEndpointAccess * @see AWS API Documentation */ @Override public GetEndpointAccessResponse getEndpointAccess(GetEndpointAccessRequest getEndpointAccessRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetEndpointAccessResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getEndpointAccessRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getEndpointAccessRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetEndpointAccess"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetEndpointAccess").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getEndpointAccessRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetEndpointAccessRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a namespace in Amazon Redshift Serverless. *

* * @param getNamespaceRequest * @return Result of the GetNamespace operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.GetNamespace * @see AWS API Documentation */ @Override public GetNamespaceResponse getNamespace(GetNamespaceRequest getNamespaceRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetNamespaceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getNamespaceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getNamespaceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetNamespace"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetNamespace").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getNamespaceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetNamespaceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a recovery point. *

* * @param getRecoveryPointRequest * @return Result of the GetRecoveryPoint operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.GetRecoveryPoint * @see AWS API Documentation */ @Override public GetRecoveryPointResponse getRecoveryPoint(GetRecoveryPointRequest getRecoveryPointRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetRecoveryPointResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getRecoveryPointRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getRecoveryPointRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetRecoveryPoint"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetRecoveryPoint").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getRecoveryPointRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetRecoveryPointRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a resource policy. *

* * @param getResourcePolicyRequest * @return Result of the GetResourcePolicy operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.GetResourcePolicy * @see AWS API Documentation */ @Override public GetResourcePolicyResponse getResourcePolicy(GetResourcePolicyRequest getResourcePolicyRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetResourcePolicyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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 Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetResourcePolicy"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetResourcePolicy").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getResourcePolicyRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetResourcePolicyRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a scheduled action. *

* * @param getScheduledActionRequest * @return Result of the GetScheduledAction operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.GetScheduledAction * @see AWS API Documentation */ @Override public GetScheduledActionResponse getScheduledAction(GetScheduledActionRequest getScheduledActionRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetScheduledActionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getScheduledActionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getScheduledActionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetScheduledAction"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetScheduledAction").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getScheduledActionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetScheduledActionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a specific snapshot. *

* * @param getSnapshotRequest * @return Result of the GetSnapshot operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.GetSnapshot * @see AWS API Documentation */ @Override public GetSnapshotResponse getSnapshot(GetSnapshotRequest getSnapshotRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getSnapshotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getSnapshotRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetSnapshot"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetSnapshot").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withInput(getSnapshotRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetSnapshotRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a TableRestoreStatus object. *

* * @param getTableRestoreStatusRequest * @return Result of the GetTableRestoreStatus operation returned by the service. * @throws ResourceNotFoundException * The resource could not be found. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.GetTableRestoreStatus * @see AWS API Documentation */ @Override public GetTableRestoreStatusResponse getTableRestoreStatus(GetTableRestoreStatusRequest getTableRestoreStatusRequest) throws ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetTableRestoreStatusResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getTableRestoreStatusRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getTableRestoreStatusRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetTableRestoreStatus"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetTableRestoreStatus").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getTableRestoreStatusRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetTableRestoreStatusRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a usage limit. *

* * @param getUsageLimitRequest * @return Result of the GetUsageLimit operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.GetUsageLimit * @see AWS API Documentation */ @Override public GetUsageLimitResponse getUsageLimit(GetUsageLimitRequest getUsageLimitRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetUsageLimitResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getUsageLimitRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getUsageLimitRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetUsageLimit"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetUsageLimit").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getUsageLimitRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetUsageLimitRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a specific workgroup. *

* * @param getWorkgroupRequest * @return Result of the GetWorkgroup operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.GetWorkgroup * @see AWS API Documentation */ @Override public GetWorkgroupResponse getWorkgroup(GetWorkgroupRequest getWorkgroupRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetWorkgroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getWorkgroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getWorkgroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetWorkgroup"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetWorkgroup").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getWorkgroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetWorkgroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists custom domain associations for Amazon Redshift Serverless. *

* * @param listCustomDomainAssociationsRequest * @return Result of the ListCustomDomainAssociations operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws InvalidPaginationException * The provided pagination token is invalid. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.ListCustomDomainAssociations * @see AWS API Documentation */ @Override public ListCustomDomainAssociationsResponse listCustomDomainAssociations( ListCustomDomainAssociationsRequest listCustomDomainAssociationsRequest) throws InternalServerException, InvalidPaginationException, ValidationException, AccessDeniedException, ThrottlingException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListCustomDomainAssociationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listCustomDomainAssociationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listCustomDomainAssociationsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListCustomDomainAssociations"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListCustomDomainAssociations").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listCustomDomainAssociationsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListCustomDomainAssociationsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns an array of EndpointAccess objects and relevant information. *

* * @param listEndpointAccessRequest * @return Result of the ListEndpointAccess operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.ListEndpointAccess * @see AWS API Documentation */ @Override public ListEndpointAccessResponse listEndpointAccess(ListEndpointAccessRequest listEndpointAccessRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListEndpointAccessResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listEndpointAccessRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listEndpointAccessRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListEndpointAccess"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListEndpointAccess").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listEndpointAccessRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListEndpointAccessRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a list of specified namespaces. *

* * @param listNamespacesRequest * @return Result of the ListNamespaces operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.ListNamespaces * @see AWS API Documentation */ @Override public ListNamespacesResponse listNamespaces(ListNamespacesRequest listNamespacesRequest) throws InternalServerException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListNamespacesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listNamespacesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listNamespacesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListNamespaces"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListNamespaces").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listNamespacesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListNamespacesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns an array of recovery points. *

* * @param listRecoveryPointsRequest * @return Result of the ListRecoveryPoints operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.ListRecoveryPoints * @see AWS API Documentation */ @Override public ListRecoveryPointsResponse listRecoveryPoints(ListRecoveryPointsRequest listRecoveryPointsRequest) throws InternalServerException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListRecoveryPointsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listRecoveryPointsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listRecoveryPointsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRecoveryPoints"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListRecoveryPoints").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listRecoveryPointsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListRecoveryPointsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of scheduled actions. You can use the flags to filter the list of returned scheduled actions. *

* * @param listScheduledActionsRequest * @return Result of the ListScheduledActions operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws InvalidPaginationException * The provided pagination token is invalid. * @throws ResourceNotFoundException * The resource could not be found. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.ListScheduledActions * @see AWS API Documentation */ @Override public ListScheduledActionsResponse listScheduledActions(ListScheduledActionsRequest listScheduledActionsRequest) throws InternalServerException, InvalidPaginationException, ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListScheduledActionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listScheduledActionsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listScheduledActionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListScheduledActions"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListScheduledActions").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listScheduledActionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListScheduledActionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of snapshot copy configurations. *

* * @param listSnapshotCopyConfigurationsRequest * @return Result of the ListSnapshotCopyConfigurations operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws InvalidPaginationException * The provided pagination token is invalid. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.ListSnapshotCopyConfigurations * @see AWS API Documentation */ @Override public ListSnapshotCopyConfigurationsResponse listSnapshotCopyConfigurations( ListSnapshotCopyConfigurationsRequest listSnapshotCopyConfigurationsRequest) throws InternalServerException, InvalidPaginationException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListSnapshotCopyConfigurationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listSnapshotCopyConfigurationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSnapshotCopyConfigurationsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSnapshotCopyConfigurations"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListSnapshotCopyConfigurations").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listSnapshotCopyConfigurationsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListSnapshotCopyConfigurationsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of snapshots. *

* * @param listSnapshotsRequest * @return Result of the ListSnapshots operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.ListSnapshots * @see AWS API Documentation */ @Override public ListSnapshotsResponse listSnapshots(ListSnapshotsRequest listSnapshotsRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListSnapshotsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listSnapshotsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listSnapshotsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListSnapshots"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListSnapshots").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listSnapshotsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListSnapshotsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about an array of TableRestoreStatus objects. *

* * @param listTableRestoreStatusRequest * @return Result of the ListTableRestoreStatus operation returned by the service. * @throws InvalidPaginationException * The provided pagination token is invalid. * @throws ResourceNotFoundException * The resource could not be found. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.ListTableRestoreStatus * @see AWS API Documentation */ @Override public ListTableRestoreStatusResponse listTableRestoreStatus(ListTableRestoreStatusRequest listTableRestoreStatusRequest) throws InvalidPaginationException, ResourceNotFoundException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListTableRestoreStatusResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTableRestoreStatusRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTableRestoreStatusRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTableRestoreStatus"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListTableRestoreStatus").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listTableRestoreStatusRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListTableRestoreStatusRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the tags assigned to a resource. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.ListTagsForResource * @see AWS API Documentation */ @Override public ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, ThrottlingException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListTagsForResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTagsForResourceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTagsForResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTagsForResource"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListTagsForResource").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listTagsForResourceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists all usage limits within Amazon Redshift Serverless. *

* * @param listUsageLimitsRequest * @return Result of the ListUsageLimits operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws InvalidPaginationException * The provided pagination token is invalid. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.ListUsageLimits * @see AWS API Documentation */ @Override public ListUsageLimitsResponse listUsageLimits(ListUsageLimitsRequest listUsageLimitsRequest) throws InternalServerException, InvalidPaginationException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListUsageLimitsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listUsageLimitsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listUsageLimitsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListUsageLimits"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListUsageLimits").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listUsageLimitsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListUsageLimitsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a list of specified workgroups. *

* * @param listWorkgroupsRequest * @return Result of the ListWorkgroups operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.ListWorkgroups * @see AWS API Documentation */ @Override public ListWorkgroupsResponse listWorkgroups(ListWorkgroupsRequest listWorkgroupsRequest) throws InternalServerException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListWorkgroupsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listWorkgroupsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listWorkgroupsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListWorkgroups"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListWorkgroups").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listWorkgroupsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListWorkgroupsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates or updates a resource policy. Currently, you can use policies to share snapshots across Amazon Web * Services accounts. *

* * @param putResourcePolicyRequest * @return Result of the PutResourcePolicy operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws ServiceQuotaExceededException * The service limit was exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.PutResourcePolicy * @see AWS API Documentation */ @Override public PutResourcePolicyResponse putResourcePolicy(PutResourcePolicyRequest putResourcePolicyRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, PutResourcePolicyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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 Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutResourcePolicy"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("PutResourcePolicy").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(putResourcePolicyRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new PutResourcePolicyRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Restore the data from a recovery point. *

* * @param restoreFromRecoveryPointRequest * @return Result of the RestoreFromRecoveryPoint operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.RestoreFromRecoveryPoint * @see AWS API Documentation */ @Override public RestoreFromRecoveryPointResponse restoreFromRecoveryPoint( RestoreFromRecoveryPointRequest restoreFromRecoveryPointRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RestoreFromRecoveryPointResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(restoreFromRecoveryPointRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, restoreFromRecoveryPointRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RestoreFromRecoveryPoint"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("RestoreFromRecoveryPoint").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(restoreFromRecoveryPointRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RestoreFromRecoveryPointRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Restores a namespace from a snapshot. *

* * @param restoreFromSnapshotRequest * @return Result of the RestoreFromSnapshot operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws ServiceQuotaExceededException * The service limit was exceeded. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.RestoreFromSnapshot * @see AWS API Documentation */ @Override public RestoreFromSnapshotResponse restoreFromSnapshot(RestoreFromSnapshotRequest restoreFromSnapshotRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RestoreFromSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(restoreFromSnapshotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, restoreFromSnapshotRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RestoreFromSnapshot"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("RestoreFromSnapshot").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(restoreFromSnapshotRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RestoreFromSnapshotRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Restores a table from a recovery point to your Amazon Redshift Serverless instance. You can't use this operation * to restore tables with interleaved sort keys. *

* * @param restoreTableFromRecoveryPointRequest * @return Result of the RestoreTableFromRecoveryPoint operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.RestoreTableFromRecoveryPoint * @see AWS API Documentation */ @Override public RestoreTableFromRecoveryPointResponse restoreTableFromRecoveryPoint( RestoreTableFromRecoveryPointRequest restoreTableFromRecoveryPointRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RestoreTableFromRecoveryPointResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(restoreTableFromRecoveryPointRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, restoreTableFromRecoveryPointRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RestoreTableFromRecoveryPoint"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("RestoreTableFromRecoveryPoint").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(restoreTableFromRecoveryPointRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RestoreTableFromRecoveryPointRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Restores a table from a snapshot to your Amazon Redshift Serverless instance. You can't use this operation to * restore tables with interleaved * sort keys. *

* * @param restoreTableFromSnapshotRequest * @return Result of the RestoreTableFromSnapshot operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.RestoreTableFromSnapshot * @see AWS API Documentation */ @Override public RestoreTableFromSnapshotResponse restoreTableFromSnapshot( RestoreTableFromSnapshotRequest restoreTableFromSnapshotRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RestoreTableFromSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(restoreTableFromSnapshotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, restoreTableFromSnapshotRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RestoreTableFromSnapshot"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("RestoreTableFromSnapshot").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(restoreTableFromSnapshotRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new RestoreTableFromSnapshotRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Assigns one or more tags to a resource. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws TooManyTagsException * The request exceeded the number of tags allowed for a resource. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.TagResource * @see AWS API Documentation */ @Override public TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, TooManyTagsException, ThrottlingException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, TagResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(tagResourceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, tagResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TagResource"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("TagResource").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withInput(tagResourceRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new TagResourceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Removes a tag or set of tags from a resource. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.UntagResource * @see AWS API Documentation */ @Override public UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws InternalServerException, ResourceNotFoundException, ValidationException, ThrottlingException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UntagResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(untagResourceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, untagResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UntagResource"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UntagResource").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(untagResourceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UntagResourceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates an Amazon Redshift Serverless certificate associated with a custom domain. *

* * @param updateCustomDomainAssociationRequest * @return Result of the UpdateCustomDomainAssociation operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.UpdateCustomDomainAssociation * @see AWS API Documentation */ @Override public UpdateCustomDomainAssociationResponse updateCustomDomainAssociation( UpdateCustomDomainAssociationRequest updateCustomDomainAssociationRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AccessDeniedException, ThrottlingException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateCustomDomainAssociationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateCustomDomainAssociationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateCustomDomainAssociationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateCustomDomainAssociation"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateCustomDomainAssociation").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(updateCustomDomainAssociationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateCustomDomainAssociationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates an Amazon Redshift Serverless managed endpoint. *

* * @param updateEndpointAccessRequest * @return Result of the UpdateEndpointAccess operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.UpdateEndpointAccess * @see AWS API Documentation */ @Override public UpdateEndpointAccessResponse updateEndpointAccess(UpdateEndpointAccessRequest updateEndpointAccessRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateEndpointAccessResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateEndpointAccessRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateEndpointAccessRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateEndpointAccess"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateEndpointAccess").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(updateEndpointAccessRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateEndpointAccessRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a namespace with the specified settings. Unless required, you can't update multiple parameters in one * request. For example, you must specify both adminUsername and adminUserPassword to * update either field, but you can't update both kmsKeyId and logExports in a single * request. *

* * @param updateNamespaceRequest * @return Result of the UpdateNamespace operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.UpdateNamespace * @see AWS API Documentation */ @Override public UpdateNamespaceResponse updateNamespace(UpdateNamespaceRequest updateNamespaceRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateNamespaceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateNamespaceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateNamespaceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateNamespace"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateNamespace").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(updateNamespaceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateNamespaceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a scheduled action. *

* * @param updateScheduledActionRequest * @return Result of the UpdateScheduledAction operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.UpdateScheduledAction * @see AWS API Documentation */ @Override public UpdateScheduledActionResponse updateScheduledAction(UpdateScheduledActionRequest updateScheduledActionRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateScheduledActionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateScheduledActionRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateScheduledActionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateScheduledAction"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateScheduledAction").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(updateScheduledActionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateScheduledActionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a snapshot. *

* * @param updateSnapshotRequest * @return Result of the UpdateSnapshot operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.UpdateSnapshot * @see AWS API Documentation */ @Override public UpdateSnapshotResponse updateSnapshot(UpdateSnapshotRequest updateSnapshotRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateSnapshotResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateSnapshotRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateSnapshotRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateSnapshot"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateSnapshot").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(updateSnapshotRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateSnapshotRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a snapshot copy configuration. *

* * @param updateSnapshotCopyConfigurationRequest * @return Result of the UpdateSnapshotCopyConfiguration operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.UpdateSnapshotCopyConfiguration * @see AWS API Documentation */ @Override public UpdateSnapshotCopyConfigurationResponse updateSnapshotCopyConfiguration( UpdateSnapshotCopyConfigurationRequest updateSnapshotCopyConfigurationRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateSnapshotCopyConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateSnapshotCopyConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateSnapshotCopyConfigurationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateSnapshotCopyConfiguration"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateSnapshotCopyConfiguration").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(updateSnapshotCopyConfigurationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateSnapshotCopyConfigurationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Update a usage limit in Amazon Redshift Serverless. You can't update the usage type or period of a usage limit. *

* * @param updateUsageLimitRequest * @return Result of the UpdateUsageLimit operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.UpdateUsageLimit * @see AWS API Documentation */ @Override public UpdateUsageLimitResponse updateUsageLimit(UpdateUsageLimitRequest updateUsageLimitRequest) throws InternalServerException, ResourceNotFoundException, ConflictException, ValidationException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateUsageLimitResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateUsageLimitRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateUsageLimitRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateUsageLimit"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateUsageLimit").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(updateUsageLimitRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateUsageLimitRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a workgroup with the specified configuration settings. You can't update multiple parameters in one * request. For example, you can update baseCapacity or port in a single request, but you * can't update both in the same request. *

* * @param updateWorkgroupRequest * @return Result of the UpdateWorkgroup operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws InsufficientCapacityException * There is an insufficient capacity to perform the action. * @throws ResourceNotFoundException * The resource could not be found. * @throws ConflictException * The submitted action has conflicts. * @throws ValidationException * The input failed to satisfy the constraints specified by an AWS service. * @throws 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. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws RedshiftServerlessException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample RedshiftServerlessClient.UpdateWorkgroup * @see AWS API Documentation */ @Override public UpdateWorkgroupResponse updateWorkgroup(UpdateWorkgroupRequest updateWorkgroupRequest) throws InternalServerException, InsufficientCapacityException, ResourceNotFoundException, ConflictException, ValidationException, Ipv6CidrBlockNotFoundException, AwsServiceException, SdkClientException, RedshiftServerlessException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateWorkgroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateWorkgroupRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateWorkgroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Redshift Serverless"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateWorkgroup"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateWorkgroup").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(updateWorkgroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateWorkgroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } @Override public final String serviceName() { return SERVICE_NAME; } 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 HttpResponseHandler createErrorResponseHandler(BaseAwsJsonProtocolFactory protocolFactory, JsonOperationMetadata operationMetadata) { return protocolFactory.createErrorResponseHandler(operationMetadata); } 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(); } RedshiftServerlessServiceClientConfigurationBuilder serviceConfigBuilder = new RedshiftServerlessServiceClientConfigurationBuilder( configuration); for (SdkPlugin plugin : plugins) { plugin.configureClient(serviceConfigBuilder); } updateRetryStrategyClientConfiguration(configuration); return configuration.build(); } private > T init(T builder) { return builder .clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(RedshiftServerlessException::builder) .protocol(AwsJsonProtocol.AWS_JSON) .protocolVersion("1.1") .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidPaginationException") .exceptionBuilderSupplier(InvalidPaginationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ThrottlingException") .exceptionBuilderSupplier(ThrottlingException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("Ipv6CidrBlockNotFoundException") .exceptionBuilderSupplier(Ipv6CidrBlockNotFoundException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ServiceQuotaExceededException") .exceptionBuilderSupplier(ServiceQuotaExceededException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InsufficientCapacityException") .exceptionBuilderSupplier(InsufficientCapacityException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InternalServerException") .exceptionBuilderSupplier(InternalServerException::builder).httpStatusCode(500).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AccessDeniedException") .exceptionBuilderSupplier(AccessDeniedException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ConflictException") .exceptionBuilderSupplier(ConflictException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("TooManyTagsException") .exceptionBuilderSupplier(TooManyTagsException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceNotFoundException") .exceptionBuilderSupplier(ResourceNotFoundException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ValidationException") .exceptionBuilderSupplier(ValidationException::builder).httpStatusCode(400).build()); } @Override public final RedshiftServerlessServiceClientConfiguration serviceClientConfiguration() { return new RedshiftServerlessServiceClientConfigurationBuilder(this.clientConfiguration.toBuilder()).build(); } @Override public void close() { clientHandler.close(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy