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

software.amazon.awssdk.services.route53recoverycluster.DefaultRoute53RecoveryClusterClient Maven / Gradle / Ivy

Go to download

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

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

import java.util.Collections;
import java.util.List;
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.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkPlugin;
import software.amazon.awssdk.core.SdkRequest;
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.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.services.route53recoverycluster.internal.Route53RecoveryClusterServiceClientConfigurationBuilder;
import software.amazon.awssdk.services.route53recoverycluster.model.AccessDeniedException;
import software.amazon.awssdk.services.route53recoverycluster.model.ConflictException;
import software.amazon.awssdk.services.route53recoverycluster.model.EndpointTemporarilyUnavailableException;
import software.amazon.awssdk.services.route53recoverycluster.model.GetRoutingControlStateRequest;
import software.amazon.awssdk.services.route53recoverycluster.model.GetRoutingControlStateResponse;
import software.amazon.awssdk.services.route53recoverycluster.model.InternalServerException;
import software.amazon.awssdk.services.route53recoverycluster.model.ListRoutingControlsRequest;
import software.amazon.awssdk.services.route53recoverycluster.model.ListRoutingControlsResponse;
import software.amazon.awssdk.services.route53recoverycluster.model.ResourceNotFoundException;
import software.amazon.awssdk.services.route53recoverycluster.model.Route53RecoveryClusterException;
import software.amazon.awssdk.services.route53recoverycluster.model.ServiceLimitExceededException;
import software.amazon.awssdk.services.route53recoverycluster.model.ThrottlingException;
import software.amazon.awssdk.services.route53recoverycluster.model.UpdateRoutingControlStateRequest;
import software.amazon.awssdk.services.route53recoverycluster.model.UpdateRoutingControlStateResponse;
import software.amazon.awssdk.services.route53recoverycluster.model.UpdateRoutingControlStatesRequest;
import software.amazon.awssdk.services.route53recoverycluster.model.UpdateRoutingControlStatesResponse;
import software.amazon.awssdk.services.route53recoverycluster.model.ValidationException;
import software.amazon.awssdk.services.route53recoverycluster.transform.GetRoutingControlStateRequestMarshaller;
import software.amazon.awssdk.services.route53recoverycluster.transform.ListRoutingControlsRequestMarshaller;
import software.amazon.awssdk.services.route53recoverycluster.transform.UpdateRoutingControlStateRequestMarshaller;
import software.amazon.awssdk.services.route53recoverycluster.transform.UpdateRoutingControlStatesRequestMarshaller;
import software.amazon.awssdk.utils.Logger;

/**
 * Internal implementation of {@link Route53RecoveryClusterClient}.
 *
 * @see Route53RecoveryClusterClient#builder()
 */
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultRoute53RecoveryClusterClient implements Route53RecoveryClusterClient {
    private static final Logger log = Logger.loggerFor(DefaultRoute53RecoveryClusterClient.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 DefaultRoute53RecoveryClusterClient(SdkClientConfiguration clientConfiguration) {
        this.clientHandler = new AwsSyncClientHandler(clientConfiguration);
        this.clientConfiguration = clientConfiguration;
        this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
    }

    /**
     * 

* Get the state for a routing control. A routing control is a simple on/off switch that you can use to route * traffic to cells. When a routing control state is set to ON, traffic flows to a cell. When the state is set to * OFF, traffic does not flow. *

*

* Before you can create a routing control, you must first create a cluster, and then host the control in a control * panel on the cluster. For more information, see Create routing control * structures in the Amazon Route 53 Application Recovery Controller Developer Guide. You access one of the * endpoints for the cluster to get or update the routing control state to redirect traffic for your application. *

*

* You must specify Regional endpoints when you work with API cluster operations to get or update routing control * states in Route 53 ARC. *

*

* To see a code example for getting a routing control state, including accessing Regional cluster endpoints in * sequence, see API * examples in the Amazon Route 53 Application Recovery Controller Developer Guide. *

*

* Learn more about working with routing controls in the following topics in the Amazon Route 53 Application * Recovery Controller Developer Guide: *

* * * @param getRoutingControlStateRequest * @return Result of the GetRoutingControlState operation returned by the service. * @throws AccessDeniedException * You don't have sufficient permissions to perform this action. * @throws InternalServerException * There was an unexpected error during processing of the request. * @throws ResourceNotFoundException * The request references a routing control or control panel that was not found. * @throws ValidationException * There was a validation error on the request. * @throws ThrottlingException * The request was denied because of request throttling. * @throws EndpointTemporarilyUnavailableException * The cluster endpoint isn't available. Try another cluster endpoint. * @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 Route53RecoveryClusterException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample Route53RecoveryClusterClient.GetRoutingControlState * @see AWS API Documentation */ @Override public GetRoutingControlStateResponse getRoutingControlState(GetRoutingControlStateRequest getRoutingControlStateRequest) throws AccessDeniedException, InternalServerException, ResourceNotFoundException, ValidationException, ThrottlingException, EndpointTemporarilyUnavailableException, AwsServiceException, SdkClientException, Route53RecoveryClusterException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetRoutingControlStateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getRoutingControlStateRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getRoutingControlStateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route53 Recovery Cluster"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetRoutingControlState"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetRoutingControlState").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getRoutingControlStateRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetRoutingControlStateRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* List routing control names and Amazon Resource Names (ARNs), as well as the routing control state for each * routing control, along with the control panel name and control panel ARN for the routing controls. If you specify * a control panel ARN, this call lists the routing controls in the control panel. Otherwise, it lists all the * routing controls in the cluster. *

*

* A routing control is a simple on/off switch in Route 53 ARC that you can use to route traffic to cells. When a * routing control state is set to ON, traffic flows to a cell. When the state is set to OFF, traffic does not flow. *

*

* Before you can create a routing control, you must first create a cluster, and then host the control in a control * panel on the cluster. For more information, see Create routing control * structures in the Amazon Route 53 Application Recovery Controller Developer Guide. You access one of the * endpoints for the cluster to get or update the routing control state to redirect traffic for your application. *

*

* You must specify Regional endpoints when you work with API cluster operations to use this API operation to * list routing controls in Route 53 ARC. *

*

* Learn more about working with routing controls in the following topics in the Amazon Route 53 Application * Recovery Controller Developer Guide: *

* * * @param listRoutingControlsRequest * @return Result of the ListRoutingControls operation returned by the service. * @throws AccessDeniedException * You don't have sufficient permissions to perform this action. * @throws InternalServerException * There was an unexpected error during processing of the request. * @throws ResourceNotFoundException * The request references a routing control or control panel that was not found. * @throws ValidationException * There was a validation error on the request. * @throws ThrottlingException * The request was denied because of request throttling. * @throws EndpointTemporarilyUnavailableException * The cluster endpoint isn't available. Try another cluster endpoint. * @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 Route53RecoveryClusterException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample Route53RecoveryClusterClient.ListRoutingControls * @see AWS API Documentation */ @Override public ListRoutingControlsResponse listRoutingControls(ListRoutingControlsRequest listRoutingControlsRequest) throws AccessDeniedException, InternalServerException, ResourceNotFoundException, ValidationException, ThrottlingException, EndpointTemporarilyUnavailableException, AwsServiceException, SdkClientException, Route53RecoveryClusterException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListRoutingControlsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listRoutingControlsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listRoutingControlsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route53 Recovery Cluster"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListRoutingControls"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListRoutingControls").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listRoutingControlsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListRoutingControlsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Set the state of the routing control to reroute traffic. You can set the value to ON or OFF. When the state is * ON, traffic flows to a cell. When the state is OFF, traffic does not flow. *

*

* With Route 53 ARC, you can add safety rules for routing controls, which are safeguards for routing control state * updates that help prevent unexpected outcomes, like fail open traffic routing. However, there are scenarios when * you might want to bypass the routing control safeguards that are enforced with safety rules that you've * configured. For example, you might want to fail over quickly for disaster recovery, and one or more safety rules * might be unexpectedly preventing you from updating a routing control state to reroute traffic. In a "break glass" * scenario like this, you can override one or more safety rules to change a routing control state and fail over * your application. *

*

* The SafetyRulesToOverride property enables you override one or more safety rules and update routing * control states. For more information, see Override * safety rules to reroute traffic in the Amazon Route 53 Application Recovery Controller Developer Guide. *

*

* You must specify Regional endpoints when you work with API cluster operations to get or update routing control * states in Route 53 ARC. *

*

* To see a code example for getting a routing control state, including accessing Regional cluster endpoints in * sequence, see API * examples in the Amazon Route 53 Application Recovery Controller Developer Guide. *

* * * @param updateRoutingControlStateRequest * @return Result of the UpdateRoutingControlState operation returned by the service. * @throws AccessDeniedException * You don't have sufficient permissions to perform this action. * @throws InternalServerException * There was an unexpected error during processing of the request. * @throws ResourceNotFoundException * The request references a routing control or control panel that was not found. * @throws ValidationException * There was a validation error on the request. * @throws ThrottlingException * The request was denied because of request throttling. * @throws EndpointTemporarilyUnavailableException * The cluster endpoint isn't available. Try another cluster endpoint. * @throws ConflictException * There was a conflict with this request. Try again. * @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 Route53RecoveryClusterException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample Route53RecoveryClusterClient.UpdateRoutingControlState * @see AWS API Documentation */ @Override public UpdateRoutingControlStateResponse updateRoutingControlState( UpdateRoutingControlStateRequest updateRoutingControlStateRequest) throws AccessDeniedException, InternalServerException, ResourceNotFoundException, ValidationException, ThrottlingException, EndpointTemporarilyUnavailableException, ConflictException, AwsServiceException, SdkClientException, Route53RecoveryClusterException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateRoutingControlStateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateRoutingControlStateRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateRoutingControlStateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route53 Recovery Cluster"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateRoutingControlState"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateRoutingControlState").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(updateRoutingControlStateRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateRoutingControlStateRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Set multiple routing control states. You can set the value for each state to be ON or OFF. When the state is ON, * traffic flows to a cell. When it's OFF, traffic does not flow. *

*

* With Route 53 ARC, you can add safety rules for routing controls, which are safeguards for routing control state * updates that help prevent unexpected outcomes, like fail open traffic routing. However, there are scenarios when * you might want to bypass the routing control safeguards that are enforced with safety rules that you've * configured. For example, you might want to fail over quickly for disaster recovery, and one or more safety rules * might be unexpectedly preventing you from updating a routing control state to reroute traffic. In a "break glass" * scenario like this, you can override one or more safety rules to change a routing control state and fail over * your application. *

*

* The SafetyRulesToOverride property enables you override one or more safety rules and update routing * control states. For more information, see Override * safety rules to reroute traffic in the Amazon Route 53 Application Recovery Controller Developer Guide. *

*

* You must specify Regional endpoints when you work with API cluster operations to get or update routing control * states in Route 53 ARC. *

*

* To see a code example for getting a routing control state, including accessing Regional cluster endpoints in * sequence, see API * examples in the Amazon Route 53 Application Recovery Controller Developer Guide. *

* * * @param updateRoutingControlStatesRequest * @return Result of the UpdateRoutingControlStates operation returned by the service. * @throws AccessDeniedException * You don't have sufficient permissions to perform this action. * @throws InternalServerException * There was an unexpected error during processing of the request. * @throws ResourceNotFoundException * The request references a routing control or control panel that was not found. * @throws ValidationException * There was a validation error on the request. * @throws ThrottlingException * The request was denied because of request throttling. * @throws EndpointTemporarilyUnavailableException * The cluster endpoint isn't available. Try another cluster endpoint. * @throws ConflictException * There was a conflict with this request. Try again. * @throws ServiceLimitExceededException * The request can't update that many routing control states at the same time. Try again with fewer routing * control states. * @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 Route53RecoveryClusterException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample Route53RecoveryClusterClient.UpdateRoutingControlStates * @see AWS API Documentation */ @Override public UpdateRoutingControlStatesResponse updateRoutingControlStates( UpdateRoutingControlStatesRequest updateRoutingControlStatesRequest) throws AccessDeniedException, InternalServerException, ResourceNotFoundException, ValidationException, ThrottlingException, EndpointTemporarilyUnavailableException, ConflictException, ServiceLimitExceededException, AwsServiceException, SdkClientException, Route53RecoveryClusterException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateRoutingControlStatesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateRoutingControlStatesRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateRoutingControlStatesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route53 Recovery Cluster"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateRoutingControlStates"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateRoutingControlStates").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(updateRoutingControlStatesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateRoutingControlStatesRequestMarshaller(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 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(); } Route53RecoveryClusterServiceClientConfigurationBuilder serviceConfigBuilder = new Route53RecoveryClusterServiceClientConfigurationBuilder( configuration); for (SdkPlugin plugin : plugins) { plugin.configureClient(serviceConfigBuilder); } return configuration.build(); } private > T init(T builder) { return builder .clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(Route53RecoveryClusterException::builder) .protocol(AwsJsonProtocol.AWS_JSON) .protocolVersion("1.0") .registerModeledException( ExceptionMetadata.builder().errorCode("AccessDeniedException") .exceptionBuilderSupplier(AccessDeniedException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ValidationException") .exceptionBuilderSupplier(ValidationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ConflictException") .exceptionBuilderSupplier(ConflictException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InternalServerException") .exceptionBuilderSupplier(InternalServerException::builder).httpStatusCode(500).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ServiceLimitExceededException") .exceptionBuilderSupplier(ServiceLimitExceededException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("EndpointTemporarilyUnavailableException") .exceptionBuilderSupplier(EndpointTemporarilyUnavailableException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ThrottlingException") .exceptionBuilderSupplier(ThrottlingException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceNotFoundException") .exceptionBuilderSupplier(ResourceNotFoundException::builder).httpStatusCode(400).build()); } @Override public final Route53RecoveryClusterServiceClientConfiguration serviceClientConfiguration() { return new Route53RecoveryClusterServiceClientConfigurationBuilder(this.clientConfiguration.toBuilder()).build(); } @Override public void close() { clientHandler.close(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy