software.amazon.awssdk.services.route53domains.DefaultRoute53DomainsAsyncClient Maven / Gradle / Ivy
Show all versions of route53domains Show documentation
/*
* 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.route53domains;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.client.handler.AwsAsyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.awscore.internal.AwsProtocolMetadata;
import software.amazon.awssdk.awscore.internal.AwsServiceProtocol;
import software.amazon.awssdk.awscore.retry.AwsRetryStrategy;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkPlugin;
import software.amazon.awssdk.core.SdkRequest;
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.AsyncClientHandler;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.retry.RetryMode;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.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.route53domains.internal.Route53DomainsServiceClientConfigurationBuilder;
import software.amazon.awssdk.services.route53domains.model.AcceptDomainTransferFromAnotherAwsAccountRequest;
import software.amazon.awssdk.services.route53domains.model.AcceptDomainTransferFromAnotherAwsAccountResponse;
import software.amazon.awssdk.services.route53domains.model.AssociateDelegationSignerToDomainRequest;
import software.amazon.awssdk.services.route53domains.model.AssociateDelegationSignerToDomainResponse;
import software.amazon.awssdk.services.route53domains.model.CancelDomainTransferToAnotherAwsAccountRequest;
import software.amazon.awssdk.services.route53domains.model.CancelDomainTransferToAnotherAwsAccountResponse;
import software.amazon.awssdk.services.route53domains.model.CheckDomainAvailabilityRequest;
import software.amazon.awssdk.services.route53domains.model.CheckDomainAvailabilityResponse;
import software.amazon.awssdk.services.route53domains.model.CheckDomainTransferabilityRequest;
import software.amazon.awssdk.services.route53domains.model.CheckDomainTransferabilityResponse;
import software.amazon.awssdk.services.route53domains.model.DeleteDomainRequest;
import software.amazon.awssdk.services.route53domains.model.DeleteDomainResponse;
import software.amazon.awssdk.services.route53domains.model.DeleteTagsForDomainRequest;
import software.amazon.awssdk.services.route53domains.model.DeleteTagsForDomainResponse;
import software.amazon.awssdk.services.route53domains.model.DisableDomainAutoRenewRequest;
import software.amazon.awssdk.services.route53domains.model.DisableDomainAutoRenewResponse;
import software.amazon.awssdk.services.route53domains.model.DisableDomainTransferLockRequest;
import software.amazon.awssdk.services.route53domains.model.DisableDomainTransferLockResponse;
import software.amazon.awssdk.services.route53domains.model.DisassociateDelegationSignerFromDomainRequest;
import software.amazon.awssdk.services.route53domains.model.DisassociateDelegationSignerFromDomainResponse;
import software.amazon.awssdk.services.route53domains.model.DnssecLimitExceededException;
import software.amazon.awssdk.services.route53domains.model.DomainLimitExceededException;
import software.amazon.awssdk.services.route53domains.model.DuplicateRequestException;
import software.amazon.awssdk.services.route53domains.model.EnableDomainAutoRenewRequest;
import software.amazon.awssdk.services.route53domains.model.EnableDomainAutoRenewResponse;
import software.amazon.awssdk.services.route53domains.model.EnableDomainTransferLockRequest;
import software.amazon.awssdk.services.route53domains.model.EnableDomainTransferLockResponse;
import software.amazon.awssdk.services.route53domains.model.GetContactReachabilityStatusRequest;
import software.amazon.awssdk.services.route53domains.model.GetContactReachabilityStatusResponse;
import software.amazon.awssdk.services.route53domains.model.GetDomainDetailRequest;
import software.amazon.awssdk.services.route53domains.model.GetDomainDetailResponse;
import software.amazon.awssdk.services.route53domains.model.GetDomainSuggestionsRequest;
import software.amazon.awssdk.services.route53domains.model.GetDomainSuggestionsResponse;
import software.amazon.awssdk.services.route53domains.model.GetOperationDetailRequest;
import software.amazon.awssdk.services.route53domains.model.GetOperationDetailResponse;
import software.amazon.awssdk.services.route53domains.model.InvalidInputException;
import software.amazon.awssdk.services.route53domains.model.ListDomainsRequest;
import software.amazon.awssdk.services.route53domains.model.ListDomainsResponse;
import software.amazon.awssdk.services.route53domains.model.ListOperationsRequest;
import software.amazon.awssdk.services.route53domains.model.ListOperationsResponse;
import software.amazon.awssdk.services.route53domains.model.ListPricesRequest;
import software.amazon.awssdk.services.route53domains.model.ListPricesResponse;
import software.amazon.awssdk.services.route53domains.model.ListTagsForDomainRequest;
import software.amazon.awssdk.services.route53domains.model.ListTagsForDomainResponse;
import software.amazon.awssdk.services.route53domains.model.OperationLimitExceededException;
import software.amazon.awssdk.services.route53domains.model.PushDomainRequest;
import software.amazon.awssdk.services.route53domains.model.PushDomainResponse;
import software.amazon.awssdk.services.route53domains.model.RegisterDomainRequest;
import software.amazon.awssdk.services.route53domains.model.RegisterDomainResponse;
import software.amazon.awssdk.services.route53domains.model.RejectDomainTransferFromAnotherAwsAccountRequest;
import software.amazon.awssdk.services.route53domains.model.RejectDomainTransferFromAnotherAwsAccountResponse;
import software.amazon.awssdk.services.route53domains.model.RenewDomainRequest;
import software.amazon.awssdk.services.route53domains.model.RenewDomainResponse;
import software.amazon.awssdk.services.route53domains.model.ResendContactReachabilityEmailRequest;
import software.amazon.awssdk.services.route53domains.model.ResendContactReachabilityEmailResponse;
import software.amazon.awssdk.services.route53domains.model.ResendOperationAuthorizationRequest;
import software.amazon.awssdk.services.route53domains.model.ResendOperationAuthorizationResponse;
import software.amazon.awssdk.services.route53domains.model.RetrieveDomainAuthCodeRequest;
import software.amazon.awssdk.services.route53domains.model.RetrieveDomainAuthCodeResponse;
import software.amazon.awssdk.services.route53domains.model.Route53DomainsException;
import software.amazon.awssdk.services.route53domains.model.TldRulesViolationException;
import software.amazon.awssdk.services.route53domains.model.TransferDomainRequest;
import software.amazon.awssdk.services.route53domains.model.TransferDomainResponse;
import software.amazon.awssdk.services.route53domains.model.TransferDomainToAnotherAwsAccountRequest;
import software.amazon.awssdk.services.route53domains.model.TransferDomainToAnotherAwsAccountResponse;
import software.amazon.awssdk.services.route53domains.model.UnsupportedTldException;
import software.amazon.awssdk.services.route53domains.model.UpdateDomainContactPrivacyRequest;
import software.amazon.awssdk.services.route53domains.model.UpdateDomainContactPrivacyResponse;
import software.amazon.awssdk.services.route53domains.model.UpdateDomainContactRequest;
import software.amazon.awssdk.services.route53domains.model.UpdateDomainContactResponse;
import software.amazon.awssdk.services.route53domains.model.UpdateDomainNameserversRequest;
import software.amazon.awssdk.services.route53domains.model.UpdateDomainNameserversResponse;
import software.amazon.awssdk.services.route53domains.model.UpdateTagsForDomainRequest;
import software.amazon.awssdk.services.route53domains.model.UpdateTagsForDomainResponse;
import software.amazon.awssdk.services.route53domains.model.ViewBillingRequest;
import software.amazon.awssdk.services.route53domains.model.ViewBillingResponse;
import software.amazon.awssdk.services.route53domains.transform.AcceptDomainTransferFromAnotherAwsAccountRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.AssociateDelegationSignerToDomainRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.CancelDomainTransferToAnotherAwsAccountRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.CheckDomainAvailabilityRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.CheckDomainTransferabilityRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.DeleteDomainRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.DeleteTagsForDomainRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.DisableDomainAutoRenewRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.DisableDomainTransferLockRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.DisassociateDelegationSignerFromDomainRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.EnableDomainAutoRenewRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.EnableDomainTransferLockRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.GetContactReachabilityStatusRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.GetDomainDetailRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.GetDomainSuggestionsRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.GetOperationDetailRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.ListDomainsRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.ListOperationsRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.ListPricesRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.ListTagsForDomainRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.PushDomainRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.RegisterDomainRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.RejectDomainTransferFromAnotherAwsAccountRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.RenewDomainRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.ResendContactReachabilityEmailRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.ResendOperationAuthorizationRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.RetrieveDomainAuthCodeRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.TransferDomainRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.TransferDomainToAnotherAwsAccountRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.UpdateDomainContactPrivacyRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.UpdateDomainContactRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.UpdateDomainNameserversRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.UpdateTagsForDomainRequestMarshaller;
import software.amazon.awssdk.services.route53domains.transform.ViewBillingRequestMarshaller;
import software.amazon.awssdk.utils.CompletableFutureUtils;
/**
* Internal implementation of {@link Route53DomainsAsyncClient}.
*
* @see Route53DomainsAsyncClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultRoute53DomainsAsyncClient implements Route53DomainsAsyncClient {
private static final Logger log = LoggerFactory.getLogger(DefaultRoute53DomainsAsyncClient.class);
private static final AwsProtocolMetadata protocolMetadata = AwsProtocolMetadata.builder()
.serviceProtocol(AwsServiceProtocol.AWS_JSON).build();
private final AsyncClientHandler clientHandler;
private final AwsJsonProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
protected DefaultRoute53DomainsAsyncClient(SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsAsyncClientHandler(clientConfiguration);
this.clientConfiguration = clientConfiguration.toBuilder().option(SdkClientOption.SDK_CLIENT, this).build();
this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
}
/**
*
* Accepts the transfer of a domain from another Amazon Web Services account to the currentAmazon Web Services
* account. You initiate a transfer between Amazon Web Services accounts using TransferDomainToAnotherAwsAccount.
*
*
* If you use the CLI command at accept-domain-transfer-from-another-aws-account, use JSON format as input instead of text because otherwise
* CLI will throw an error from domain transfer input that includes single quotes.
*
*
* Use either ListOperations
* or
* GetOperationDetail to determine whether the operation succeeded. GetOperationDetail provides additional information, for example,
* Domain Transfer from Aws Account 111122223333 has been cancelled
.
*
*
* @param acceptDomainTransferFromAnotherAwsAccountRequest
* The AcceptDomainTransferFromAnotherAwsAccount request includes the following elements.
* @return A Java Future containing the result of the AcceptDomainTransferFromAnotherAwsAccount operation returned
* by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - DomainLimitExceededException The number of domains has exceeded the allowed threshold for the
* account.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.AcceptDomainTransferFromAnotherAwsAccount
* @see AWS API Documentation
*/
@Override
public CompletableFuture acceptDomainTransferFromAnotherAwsAccount(
AcceptDomainTransferFromAnotherAwsAccountRequest acceptDomainTransferFromAnotherAwsAccountRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(
acceptDomainTransferFromAnotherAwsAccountRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
acceptDomainTransferFromAnotherAwsAccountRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AcceptDomainTransferFromAnotherAwsAccount");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, AcceptDomainTransferFromAnotherAwsAccountResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AcceptDomainTransferFromAnotherAwsAccount")
.withProtocolMetadata(protocolMetadata)
.withMarshaller(new AcceptDomainTransferFromAnotherAwsAccountRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(acceptDomainTransferFromAnotherAwsAccountRequest));
CompletableFuture whenCompleted = executeFuture
.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a delegation signer (DS) record in the registry zone for this domain name.
*
*
* Note that creating DS record at the registry impacts DNSSEC validation of your DNS records. This action may
* render your domain name unavailable on the internet if the steps are completed in the wrong order, or with
* incorrect timing. For more information about DNSSEC signing, see Configuring DNSSEC
* signing in the Route 53 developer guide.
*
*
* @param associateDelegationSignerToDomainRequest
* @return A Java Future containing the result of the AssociateDelegationSignerToDomain operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DuplicateRequestException The request is already in progress for the domain.
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - TldRulesViolationException The top-level domain does not support this operation.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - DnssecLimitExceededException This error is returned if you call
*
AssociateDelegationSignerToDomain
when the specified domain has reached the maximum number
* of DS records. You can't add any additional DS records unless you delete an existing one first.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.AssociateDelegationSignerToDomain
* @see AWS API Documentation
*/
@Override
public CompletableFuture associateDelegationSignerToDomain(
AssociateDelegationSignerToDomainRequest associateDelegationSignerToDomainRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateDelegationSignerToDomainRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
associateDelegationSignerToDomainRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateDelegationSignerToDomain");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, AssociateDelegationSignerToDomainResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AssociateDelegationSignerToDomain").withProtocolMetadata(protocolMetadata)
.withMarshaller(new AssociateDelegationSignerToDomainRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(associateDelegationSignerToDomainRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Cancels the transfer of a domain from the current Amazon Web Services account to another Amazon Web Services
* account. You initiate a transfer betweenAmazon Web Services accounts using TransferDomainToAnotherAwsAccount.
*
*
*
* You must cancel the transfer before the other Amazon Web Services account accepts the transfer using AcceptDomainTransferFromAnotherAwsAccount.
*
*
*
* Use either ListOperations
* or
* GetOperationDetail to determine whether the operation succeeded. GetOperationDetail provides additional information, for example,
* Domain Transfer from Aws Account 111122223333 has been cancelled
.
*
*
* @param cancelDomainTransferToAnotherAwsAccountRequest
* The CancelDomainTransferToAnotherAwsAccount request includes the following element.
* @return A Java Future containing the result of the CancelDomainTransferToAnotherAwsAccount operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.CancelDomainTransferToAnotherAwsAccount
* @see AWS API Documentation
*/
@Override
public CompletableFuture cancelDomainTransferToAnotherAwsAccount(
CancelDomainTransferToAnotherAwsAccountRequest cancelDomainTransferToAnotherAwsAccountRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(cancelDomainTransferToAnotherAwsAccountRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
cancelDomainTransferToAnotherAwsAccountRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CancelDomainTransferToAnotherAwsAccount");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, CancelDomainTransferToAnotherAwsAccountResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CancelDomainTransferToAnotherAwsAccount").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CancelDomainTransferToAnotherAwsAccountRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(cancelDomainTransferToAnotherAwsAccountRequest));
CompletableFuture whenCompleted = executeFuture
.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation checks the availability of one domain name. Note that if the availability status of a domain is
* pending, you must submit another request to determine the availability of the domain name.
*
*
* @param checkDomainAvailabilityRequest
* The CheckDomainAvailability request contains the following elements.
* @return A Java Future containing the result of the CheckDomainAvailability operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.CheckDomainAvailability
* @see AWS API Documentation
*/
@Override
public CompletableFuture checkDomainAvailability(
CheckDomainAvailabilityRequest checkDomainAvailabilityRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(checkDomainAvailabilityRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, checkDomainAvailabilityRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CheckDomainAvailability");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CheckDomainAvailabilityResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CheckDomainAvailability").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CheckDomainAvailabilityRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(checkDomainAvailabilityRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Checks whether a domain name can be transferred to Amazon Route 53.
*
*
* @param checkDomainTransferabilityRequest
* The CheckDomainTransferability request contains the following elements.
* @return A Java Future containing the result of the CheckDomainTransferability operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.CheckDomainTransferability
* @see AWS API Documentation
*/
@Override
public CompletableFuture checkDomainTransferability(
CheckDomainTransferabilityRequest checkDomainTransferabilityRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(checkDomainTransferabilityRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, checkDomainTransferabilityRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CheckDomainTransferability");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CheckDomainTransferabilityResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CheckDomainTransferability").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CheckDomainTransferabilityRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(checkDomainTransferabilityRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation deletes the specified domain. This action is permanent. For more information, see Deleting a domain name
* registration.
*
*
* To transfer the domain registration to another registrar, use the transfer process that’s provided by the
* registrar to which you want to transfer the registration. Otherwise, the following apply:
*
*
* -
*
* You can’t get a refund for the cost of a deleted domain registration.
*
*
* -
*
* The registry for the top-level domain might hold the domain name for a brief time before releasing it for other
* users to register (varies by registry).
*
*
* -
*
* When the registration has been deleted, we'll send you a confirmation to the registrant contact. The email will
* come from [email protected]
or [email protected]
.
*
*
*
*
* @param deleteDomainRequest
* @return A Java Future containing the result of the DeleteDomain operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - DuplicateRequestException The request is already in progress for the domain.
* - TldRulesViolationException The top-level domain does not support this operation.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.DeleteDomain
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture deleteDomain(DeleteDomainRequest deleteDomainRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteDomainRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDomainRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDomain");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteDomainResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteDomain").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteDomainRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteDomainRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation deletes the specified tags for a domain.
*
*
* All tag operations are eventually consistent; subsequent operations might not immediately represent all issued
* operations.
*
*
* @param deleteTagsForDomainRequest
* The DeleteTagsForDomainRequest includes the following elements.
* @return A Java Future containing the result of the DeleteTagsForDomain operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.DeleteTagsForDomain
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteTagsForDomain(
DeleteTagsForDomainRequest deleteTagsForDomainRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteTagsForDomainRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteTagsForDomainRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteTagsForDomain");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteTagsForDomainResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteTagsForDomain").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteTagsForDomainRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteTagsForDomainRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation disables automatic renewal of domain registration for the specified domain.
*
*
* @param disableDomainAutoRenewRequest
* @return A Java Future containing the result of the DisableDomainAutoRenew operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.DisableDomainAutoRenew
* @see AWS API Documentation
*/
@Override
public CompletableFuture disableDomainAutoRenew(
DisableDomainAutoRenewRequest disableDomainAutoRenewRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disableDomainAutoRenewRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, disableDomainAutoRenewRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisableDomainAutoRenew");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DisableDomainAutoRenewResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DisableDomainAutoRenew").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DisableDomainAutoRenewRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(disableDomainAutoRenewRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation removes the transfer lock on the domain (specifically the clientTransferProhibited
* status) to allow domain transfers. We recommend you refrain from performing this action unless you intend to
* transfer the domain to a different registrar. Successful submission returns an operation ID that you can use to
* track the progress and completion of the action. If the request is not completed successfully, the domain
* registrant will be notified by email.
*
*
* @param disableDomainTransferLockRequest
* The DisableDomainTransferLock request includes the following element.
* @return A Java Future containing the result of the DisableDomainTransferLock operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - DuplicateRequestException The request is already in progress for the domain.
* - TldRulesViolationException The top-level domain does not support this operation.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.DisableDomainTransferLock
* @see AWS API Documentation
*/
@Override
public CompletableFuture disableDomainTransferLock(
DisableDomainTransferLockRequest disableDomainTransferLockRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disableDomainTransferLockRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, disableDomainTransferLockRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisableDomainTransferLock");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DisableDomainTransferLockResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DisableDomainTransferLock").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DisableDomainTransferLockRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(disableDomainTransferLockRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a delegation signer (DS) record in the registry zone for this domain name.
*
*
* @param disassociateDelegationSignerFromDomainRequest
* @return A Java Future containing the result of the DisassociateDelegationSignerFromDomain operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - DuplicateRequestException The request is already in progress for the domain.
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - TldRulesViolationException The top-level domain does not support this operation.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.DisassociateDelegationSignerFromDomain
* @see AWS API Documentation
*/
@Override
public CompletableFuture disassociateDelegationSignerFromDomain(
DisassociateDelegationSignerFromDomainRequest disassociateDelegationSignerFromDomainRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateDelegationSignerFromDomainRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
disassociateDelegationSignerFromDomainRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateDelegationSignerFromDomain");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, DisassociateDelegationSignerFromDomainResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DisassociateDelegationSignerFromDomain").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DisassociateDelegationSignerFromDomainRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(disassociateDelegationSignerFromDomainRequest));
CompletableFuture whenCompleted = executeFuture
.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation configures Amazon Route 53 to automatically renew the specified domain before the domain
* registration expires. The cost of renewing your domain registration is billed to your Amazon Web Services
* account.
*
*
* The period during which you can renew a domain name varies by TLD. For a list of TLDs and their renewal policies,
* see Domains That You
* Can Register with Amazon Route 53 in the Amazon Route 53 Developer Guide. Route 53 requires that you
* renew before the end of the renewal period so we can complete processing before the deadline.
*
*
* @param enableDomainAutoRenewRequest
* @return A Java Future containing the result of the EnableDomainAutoRenew operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - TldRulesViolationException The top-level domain does not support this operation.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.EnableDomainAutoRenew
* @see AWS API Documentation
*/
@Override
public CompletableFuture enableDomainAutoRenew(
EnableDomainAutoRenewRequest enableDomainAutoRenewRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(enableDomainAutoRenewRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, enableDomainAutoRenewRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "EnableDomainAutoRenew");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, EnableDomainAutoRenewResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("EnableDomainAutoRenew").withProtocolMetadata(protocolMetadata)
.withMarshaller(new EnableDomainAutoRenewRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(enableDomainAutoRenewRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation sets the transfer lock on the domain (specifically the clientTransferProhibited
* status) to prevent domain transfers. Successful submission returns an operation ID that you can use to track the
* progress and completion of the action. If the request is not completed successfully, the domain registrant will
* be notified by email.
*
*
* @param enableDomainTransferLockRequest
* A request to set the transfer lock for the specified domain.
* @return A Java Future containing the result of the EnableDomainTransferLock operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - DuplicateRequestException The request is already in progress for the domain.
* - TldRulesViolationException The top-level domain does not support this operation.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.EnableDomainTransferLock
* @see AWS API Documentation
*/
@Override
public CompletableFuture enableDomainTransferLock(
EnableDomainTransferLockRequest enableDomainTransferLockRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(enableDomainTransferLockRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, enableDomainTransferLockRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "EnableDomainTransferLock");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, EnableDomainTransferLockResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("EnableDomainTransferLock").withProtocolMetadata(protocolMetadata)
.withMarshaller(new EnableDomainTransferLockRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(enableDomainTransferLockRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* For operations that require confirmation that the email address for the registrant contact is valid, such as
* registering a new domain, this operation returns information about whether the registrant contact has responded.
*
*
* If you want us to resend the email, use the ResendContactReachabilityEmail
operation.
*
*
* @param getContactReachabilityStatusRequest
* @return A Java Future containing the result of the GetContactReachabilityStatus operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.GetContactReachabilityStatus
* @see AWS API Documentation
*/
@Override
public CompletableFuture getContactReachabilityStatus(
GetContactReachabilityStatusRequest getContactReachabilityStatusRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getContactReachabilityStatusRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getContactReachabilityStatusRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetContactReachabilityStatus");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetContactReachabilityStatusResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetContactReachabilityStatus").withProtocolMetadata(protocolMetadata)
.withMarshaller(new GetContactReachabilityStatusRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(getContactReachabilityStatusRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation returns detailed information about a specified domain that is associated with the current Amazon
* Web Services account. Contact information for the domain is also returned as part of the output.
*
*
* @param getDomainDetailRequest
* The GetDomainDetail request includes the following element.
* @return A Java Future containing the result of the GetDomainDetail operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.GetDomainDetail
* @see AWS API Documentation
*/
@Override
public CompletableFuture getDomainDetail(GetDomainDetailRequest getDomainDetailRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getDomainDetailRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getDomainDetailRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetDomainDetail");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetDomainDetailResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetDomainDetail").withProtocolMetadata(protocolMetadata)
.withMarshaller(new GetDomainDetailRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(getDomainDetailRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* The GetDomainSuggestions operation returns a list of suggested domain names.
*
*
* @param getDomainSuggestionsRequest
* @return A Java Future containing the result of the GetDomainSuggestions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.GetDomainSuggestions
* @see AWS API Documentation
*/
@Override
public CompletableFuture getDomainSuggestions(
GetDomainSuggestionsRequest getDomainSuggestionsRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getDomainSuggestionsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getDomainSuggestionsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetDomainSuggestions");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetDomainSuggestionsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetDomainSuggestions").withProtocolMetadata(protocolMetadata)
.withMarshaller(new GetDomainSuggestionsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(getDomainSuggestionsRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation returns the current status of an operation that is not completed.
*
*
* @param getOperationDetailRequest
* The
* GetOperationDetail request includes the following element.
* @return A Java Future containing the result of the GetOperationDetail operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.GetOperationDetail
* @see AWS API Documentation
*/
@Override
public CompletableFuture getOperationDetail(GetOperationDetailRequest getOperationDetailRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getOperationDetailRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getOperationDetailRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetOperationDetail");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetOperationDetailResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetOperationDetail").withProtocolMetadata(protocolMetadata)
.withMarshaller(new GetOperationDetailRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(getOperationDetailRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation returns all the domain names registered with Amazon Route 53 for the current Amazon Web Services
* account if no filtering conditions are used.
*
*
* @param listDomainsRequest
* The ListDomains request includes the following elements.
* @return A Java Future containing the result of the ListDomains operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.ListDomains
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture listDomains(ListDomainsRequest listDomainsRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listDomainsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listDomainsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListDomains");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListDomainsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListDomains").withProtocolMetadata(protocolMetadata)
.withMarshaller(new ListDomainsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(listDomainsRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns information about all of the operations that return an operation ID and that have ever been performed on
* domains that were registered by the current account.
*
*
* This command runs only in the us-east-1 Region.
*
*
* @param listOperationsRequest
* The ListOperations request includes the following elements.
* @return A Java Future containing the result of the ListOperations operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.ListOperations
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture listOperations(ListOperationsRequest listOperationsRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listOperationsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listOperationsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListOperations");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListOperationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListOperations").withProtocolMetadata(protocolMetadata)
.withMarshaller(new ListOperationsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(listOperationsRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Lists the following prices for either all the TLDs supported by Route 53, or the specified TLD:
*
*
* -
*
* Registration
*
*
* -
*
* Transfer
*
*
* -
*
* Owner change
*
*
* -
*
* Domain renewal
*
*
* -
*
* Domain restoration
*
*
*
*
* @param listPricesRequest
* @return A Java Future containing the result of the ListPrices operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.ListPrices
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture listPrices(ListPricesRequest listPricesRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listPricesRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listPricesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPrices");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListPricesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams().withOperationName("ListPrices")
.withProtocolMetadata(protocolMetadata)
.withMarshaller(new ListPricesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(listPricesRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation returns all of the tags that are associated with the specified domain.
*
*
* All tag operations are eventually consistent; subsequent operations might not immediately represent all issued
* operations.
*
*
* @param listTagsForDomainRequest
* The ListTagsForDomainRequest includes the following elements.
* @return A Java Future containing the result of the ListTagsForDomain operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.ListTagsForDomain
* @see AWS API Documentation
*/
@Override
public CompletableFuture listTagsForDomain(ListTagsForDomainRequest listTagsForDomainRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTagsForDomainRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listTagsForDomainRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTagsForDomain");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListTagsForDomainResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListTagsForDomain").withProtocolMetadata(protocolMetadata)
.withMarshaller(new ListTagsForDomainRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(listTagsForDomainRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Moves a domain from Amazon Web Services to another registrar.
*
*
* Supported actions:
*
*
* -
*
* Changes the IPS tags of a .uk domain, and pushes it to transit. Transit means that the domain is ready to be
* transferred to another registrar.
*
*
*
*
* @param pushDomainRequest
* @return A Java Future containing the result of the PushDomain operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.PushDomain
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture pushDomain(PushDomainRequest pushDomainRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(pushDomainRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, pushDomainRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PushDomain");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
PushDomainResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams().withOperationName("PushDomain")
.withProtocolMetadata(protocolMetadata)
.withMarshaller(new PushDomainRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(pushDomainRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation registers a domain. For some top-level domains (TLDs), this operation requires extra parameters.
*
*
* When you register a domain, Amazon Route 53 does the following:
*
*
* -
*
* Creates a Route 53 hosted zone that has the same name as the domain. Route 53 assigns four name servers to your
* hosted zone and automatically updates your domain registration with the names of these name servers.
*
*
* -
*
* Enables auto renew, so your domain registration will renew automatically each year. We'll notify you in advance
* of the renewal date so you can choose whether to renew the registration.
*
*
* -
*
* Optionally enables privacy protection, so WHOIS queries return contact for the registrar or the phrase
* "REDACTED FOR PRIVACY", or "On behalf of <domain name> owner." If you don't enable privacy protection,
* WHOIS queries return the information that you entered for the administrative, registrant, and technical contacts.
*
*
*
* While some domains may allow different privacy settings per contact, we recommend specifying the same privacy
* setting for all contacts.
*
*
* -
*
* If registration is successful, returns an operation ID that you can use to track the progress and completion of
* the action. If the request is not completed successfully, the domain registrant is notified by email.
*
*
* -
*
* Charges your Amazon Web Services account an amount based on the top-level domain. For more information, see Amazon Route 53 Pricing.
*
*
*
*
* @param registerDomainRequest
* The RegisterDomain request includes the following elements.
* @return A Java Future containing the result of the RegisterDomain operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - DuplicateRequestException The request is already in progress for the domain.
* - TldRulesViolationException The top-level domain does not support this operation.
* - DomainLimitExceededException The number of domains has exceeded the allowed threshold for the
* account.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.RegisterDomain
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture registerDomain(RegisterDomainRequest registerDomainRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(registerDomainRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, registerDomainRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RegisterDomain");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, RegisterDomainResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("RegisterDomain").withProtocolMetadata(protocolMetadata)
.withMarshaller(new RegisterDomainRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(registerDomainRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Rejects the transfer of a domain from another Amazon Web Services account to the current Amazon Web Services
* account. You initiate a transfer betweenAmazon Web Services accounts using TransferDomainToAnotherAwsAccount.
*
*
* Use either ListOperations
* or
* GetOperationDetail to determine whether the operation succeeded. GetOperationDetail provides additional information, for example,
* Domain Transfer from Aws Account 111122223333 has been cancelled
.
*
*
* @param rejectDomainTransferFromAnotherAwsAccountRequest
* The RejectDomainTransferFromAnotherAwsAccount request includes the following element.
* @return A Java Future containing the result of the RejectDomainTransferFromAnotherAwsAccount operation returned
* by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.RejectDomainTransferFromAnotherAwsAccount
* @see AWS API Documentation
*/
@Override
public CompletableFuture rejectDomainTransferFromAnotherAwsAccount(
RejectDomainTransferFromAnotherAwsAccountRequest rejectDomainTransferFromAnotherAwsAccountRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(
rejectDomainTransferFromAnotherAwsAccountRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
rejectDomainTransferFromAnotherAwsAccountRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RejectDomainTransferFromAnotherAwsAccount");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, RejectDomainTransferFromAnotherAwsAccountResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("RejectDomainTransferFromAnotherAwsAccount")
.withProtocolMetadata(protocolMetadata)
.withMarshaller(new RejectDomainTransferFromAnotherAwsAccountRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(rejectDomainTransferFromAnotherAwsAccountRequest));
CompletableFuture whenCompleted = executeFuture
.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation renews a domain for the specified number of years. The cost of renewing your domain is billed to
* your Amazon Web Services account.
*
*
* We recommend that you renew your domain several weeks before the expiration date. Some TLD registries delete
* domains before the expiration date if you haven't renewed far enough in advance. For more information about
* renewing domain registration, see Renewing Registration for a
* Domain in the Amazon Route 53 Developer Guide.
*
*
* @param renewDomainRequest
* A RenewDomain
request includes the number of years that you want to renew for and the current
* expiration year.
* @return A Java Future containing the result of the RenewDomain operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - DuplicateRequestException The request is already in progress for the domain.
* - TldRulesViolationException The top-level domain does not support this operation.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.RenewDomain
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture renewDomain(RenewDomainRequest renewDomainRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(renewDomainRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, renewDomainRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RenewDomain");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
RenewDomainResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("RenewDomain").withProtocolMetadata(protocolMetadata)
.withMarshaller(new RenewDomainRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(renewDomainRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* For operations that require confirmation that the email address for the registrant contact is valid, such as
* registering a new domain, this operation resends the confirmation email to the current email address for the
* registrant contact.
*
*
* @param resendContactReachabilityEmailRequest
* @return A Java Future containing the result of the ResendContactReachabilityEmail operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.ResendContactReachabilityEmail
* @see AWS API Documentation
*/
@Override
public CompletableFuture resendContactReachabilityEmail(
ResendContactReachabilityEmailRequest resendContactReachabilityEmailRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(resendContactReachabilityEmailRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
resendContactReachabilityEmailRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ResendContactReachabilityEmail");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ResendContactReachabilityEmailResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ResendContactReachabilityEmail").withProtocolMetadata(protocolMetadata)
.withMarshaller(new ResendContactReachabilityEmailRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(resendContactReachabilityEmailRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Resend the form of authorization email for this operation.
*
*
* @param resendOperationAuthorizationRequest
* @return A Java Future containing the result of the ResendOperationAuthorization operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.ResendOperationAuthorization
* @see AWS API Documentation
*/
@Override
public CompletableFuture resendOperationAuthorization(
ResendOperationAuthorizationRequest resendOperationAuthorizationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(resendOperationAuthorizationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, resendOperationAuthorizationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ResendOperationAuthorization");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ResendOperationAuthorizationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ResendOperationAuthorization").withProtocolMetadata(protocolMetadata)
.withMarshaller(new ResendOperationAuthorizationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(resendOperationAuthorizationRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation returns the authorization code for the domain. To transfer a domain to another registrar, you
* provide this value to the new registrar.
*
*
* @param retrieveDomainAuthCodeRequest
* A request for the authorization code for the specified domain. To transfer a domain to another registrar,
* you provide this value to the new registrar.
* @return A Java Future containing the result of the RetrieveDomainAuthCode operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.RetrieveDomainAuthCode
* @see AWS API Documentation
*/
@Override
public CompletableFuture retrieveDomainAuthCode(
RetrieveDomainAuthCodeRequest retrieveDomainAuthCodeRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(retrieveDomainAuthCodeRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, retrieveDomainAuthCodeRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RetrieveDomainAuthCode");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, RetrieveDomainAuthCodeResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("RetrieveDomainAuthCode").withProtocolMetadata(protocolMetadata)
.withMarshaller(new RetrieveDomainAuthCodeRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(retrieveDomainAuthCodeRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Transfers a domain from another registrar to Amazon Route 53.
*
*
* For more information about transferring domains, see the following topics:
*
*
* -
*
* For transfer requirements, a detailed procedure, and information about viewing the status of a domain that you're
* transferring to Route 53, see Transferring
* Registration for a Domain to Amazon Route 53 in the Amazon Route 53 Developer Guide.
*
*
* -
*
* For information about how to transfer a domain from one Amazon Web Services account to another, see TransferDomainToAnotherAwsAccount.
*
*
* -
*
* For information about how to transfer a domain to another domain registrar, see Transferring
* a Domain from Amazon Route 53 to Another Registrar in the Amazon Route 53 Developer Guide.
*
*
*
*
*
* During the transfer of any country code top-level domains (ccTLDs) to Route 53, except for .cc and .tv, updates
* to the owner contact are ignored and the owner contact data from the registry is used. You can update the owner
* contact after the transfer is complete. For more information, see UpdateDomainContact.
*
*
*
* If the registrar for your domain is also the DNS service provider for the domain, we highly recommend that you
* transfer your DNS service to Route 53 or to another DNS service provider before you transfer your registration.
* Some registrars provide free DNS service when you purchase a domain registration. When you transfer the
* registration, the previous registrar will not renew your domain registration and could end your DNS service at
* any time.
*
*
*
* If the registrar for your domain is also the DNS service provider for the domain and you don't transfer DNS
* service to another provider, your website, email, and the web applications associated with the domain might
* become unavailable.
*
*
*
* If the transfer is successful, this method returns an operation ID that you can use to track the progress and
* completion of the action. If the transfer doesn't complete successfully, the domain registrant will be notified
* by email.
*
*
* @param transferDomainRequest
* The TransferDomain request includes the following elements.
* @return A Java Future containing the result of the TransferDomain operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - DuplicateRequestException The request is already in progress for the domain.
* - TldRulesViolationException The top-level domain does not support this operation.
* - DomainLimitExceededException The number of domains has exceeded the allowed threshold for the
* account.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.TransferDomain
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture transferDomain(TransferDomainRequest transferDomainRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(transferDomainRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, transferDomainRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TransferDomain");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, TransferDomainResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("TransferDomain").withProtocolMetadata(protocolMetadata)
.withMarshaller(new TransferDomainRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(transferDomainRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Transfers a domain from the current Amazon Web Services account to another Amazon Web Services account. Note the
* following:
*
*
* -
*
* The Amazon Web Services account that you're transferring the domain to must accept the transfer. If the other
* account doesn't accept the transfer within 3 days, we cancel the transfer. See AcceptDomainTransferFromAnotherAwsAccount.
*
*
* -
*
* You can cancel the transfer before the other account accepts it. See CancelDomainTransferToAnotherAwsAccount.
*
*
* -
*
* The other account can reject the transfer. See RejectDomainTransferFromAnotherAwsAccount.
*
*
*
*
*
* When you transfer a domain from one Amazon Web Services account to another, Route 53 doesn't transfer the hosted
* zone that is associated with the domain. DNS resolution isn't affected if the domain and the hosted zone are
* owned by separate accounts, so transferring the hosted zone is optional. For information about transferring the
* hosted zone to another Amazon Web Services account, see Migrating a Hosted
* Zone to a Different Amazon Web Services Account in the Amazon Route 53 Developer Guide.
*
*
*
* Use either ListOperations
* or
* GetOperationDetail to determine whether the operation succeeded. GetOperationDetail provides additional information, for example,
* Domain Transfer from Aws Account 111122223333 has been cancelled
.
*
*
* @param transferDomainToAnotherAwsAccountRequest
* The TransferDomainToAnotherAwsAccount request includes the following elements.
* @return A Java Future containing the result of the TransferDomainToAnotherAwsAccount operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - DuplicateRequestException The request is already in progress for the domain.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.TransferDomainToAnotherAwsAccount
* @see AWS API Documentation
*/
@Override
public CompletableFuture transferDomainToAnotherAwsAccount(
TransferDomainToAnotherAwsAccountRequest transferDomainToAnotherAwsAccountRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(transferDomainToAnotherAwsAccountRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
transferDomainToAnotherAwsAccountRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TransferDomainToAnotherAwsAccount");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, TransferDomainToAnotherAwsAccountResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("TransferDomainToAnotherAwsAccount").withProtocolMetadata(protocolMetadata)
.withMarshaller(new TransferDomainToAnotherAwsAccountRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(transferDomainToAnotherAwsAccountRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation updates the contact information for a particular domain. You must specify information for at least
* one contact: registrant, administrator, or technical.
*
*
* If the update is successful, this method returns an operation ID that you can use to track the progress and
* completion of the operation. If the request is not completed successfully, the domain registrant will be notified
* by email.
*
*
* @param updateDomainContactRequest
* The UpdateDomainContact request includes the following elements.
* @return A Java Future containing the result of the UpdateDomainContact operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - DuplicateRequestException The request is already in progress for the domain.
* - TldRulesViolationException The top-level domain does not support this operation.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.UpdateDomainContact
* @see AWS API Documentation
*/
@Override
public CompletableFuture updateDomainContact(
UpdateDomainContactRequest updateDomainContactRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateDomainContactRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, updateDomainContactRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateDomainContact");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, UpdateDomainContactResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateDomainContact").withProtocolMetadata(protocolMetadata)
.withMarshaller(new UpdateDomainContactRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(updateDomainContactRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation updates the specified domain contact's privacy setting. When privacy protection is enabled, your
* contact information is replaced with contact information for the registrar or with the phrase
* "REDACTED FOR PRIVACY", or "On behalf of <domain name> owner."
*
*
*
* While some domains may allow different privacy settings per contact, we recommend specifying the same privacy
* setting for all contacts.
*
*
*
* This operation affects only the contact information for the specified contact type (administrative, registrant,
* or technical). If the request succeeds, Amazon Route 53 returns an operation ID that you can use with GetOperationDetail to track the progress and completion of the action. If the request doesn't complete
* successfully, the domain registrant will be notified by email.
*
*
*
* By disabling the privacy service via API, you consent to the publication of the contact information provided for
* this domain via the public WHOIS database. You certify that you are the registrant of this domain name and have
* the authority to make this decision. You may withdraw your consent at any time by enabling privacy protection
* using either UpdateDomainContactPrivacy
or the Route 53 console. Enabling privacy protection removes
* the contact information provided for this domain from the WHOIS database. For more information on our privacy
* practices, see https://aws.amazon.com/privacy/.
*
*
*
* @param updateDomainContactPrivacyRequest
* The UpdateDomainContactPrivacy request includes the following elements.
* @return A Java Future containing the result of the UpdateDomainContactPrivacy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - DuplicateRequestException The request is already in progress for the domain.
* - TldRulesViolationException The top-level domain does not support this operation.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.UpdateDomainContactPrivacy
* @see AWS API Documentation
*/
@Override
public CompletableFuture updateDomainContactPrivacy(
UpdateDomainContactPrivacyRequest updateDomainContactPrivacyRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateDomainContactPrivacyRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, updateDomainContactPrivacyRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateDomainContactPrivacy");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, UpdateDomainContactPrivacyResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateDomainContactPrivacy").withProtocolMetadata(protocolMetadata)
.withMarshaller(new UpdateDomainContactPrivacyRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(updateDomainContactPrivacyRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation replaces the current set of name servers for the domain with the specified set of name servers. If
* you use Amazon Route 53 as your DNS service, specify the four name servers in the delegation set for the hosted
* zone for the domain.
*
*
* If successful, this operation returns an operation ID that you can use to track the progress and completion of
* the action. If the request is not completed successfully, the domain registrant will be notified by email.
*
*
* @param updateDomainNameserversRequest
* Replaces the current set of name servers for the domain with the specified set of name servers. If you use
* Amazon Route 53 as your DNS service, specify the four name servers in the delegation set for the hosted
* zone for the domain.
*
* If successful, this operation returns an operation ID that you can use to track the progress and
* completion of the action. If the request is not completed successfully, the domain registrant will be
* notified by email.
* @return A Java Future containing the result of the UpdateDomainNameservers operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - DuplicateRequestException The request is already in progress for the domain.
-
* TldRulesViolationException The top-level domain does not support this operation.
-
* OperationLimitExceededException The number of operations or jobs running exceeded the allowed threshold
* for the account.
- UnsupportedTldException Amazon Route 53 does not support this top-level domain
* (TLD).
- SdkException Base class for all exceptions that can be thrown by the SDK (both service
* and client). Can be used for catch all scenarios.
- SdkClientException If any client side error
* occurs such as an IO related failure, failure to get credentials, etc.
- Route53DomainsException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
*
*
* @sample Route53DomainsAsyncClient.UpdateDomainNameservers
* @see AWS API Documentation
*/
@Override
public CompletableFuture updateDomainNameservers(
UpdateDomainNameserversRequest updateDomainNameserversRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateDomainNameserversRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, updateDomainNameserversRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateDomainNameservers");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, UpdateDomainNameserversResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateDomainNameservers").withProtocolMetadata(protocolMetadata)
.withMarshaller(new UpdateDomainNameserversRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(updateDomainNameserversRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* This operation adds or updates tags for a specified domain.
*
*
* All tag operations are eventually consistent; subsequent operations might not immediately represent all issued
* operations.
*
*
* @param updateTagsForDomainRequest
* The UpdateTagsForDomainRequest includes the following elements.
* @return A Java Future containing the result of the UpdateTagsForDomain operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - OperationLimitExceededException The number of operations or jobs running exceeded the allowed
* threshold for the account.
* - UnsupportedTldException Amazon Route 53 does not support this top-level domain (TLD).
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.UpdateTagsForDomain
* @see AWS API Documentation
*/
@Override
public CompletableFuture updateTagsForDomain(
UpdateTagsForDomainRequest updateTagsForDomainRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateTagsForDomainRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, updateTagsForDomainRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateTagsForDomain");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, UpdateTagsForDomainResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateTagsForDomain").withProtocolMetadata(protocolMetadata)
.withMarshaller(new UpdateTagsForDomainRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(updateTagsForDomainRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns all the domain-related billing records for the current Amazon Web Services account for a specified period
*
*
* @param viewBillingRequest
* The ViewBilling request includes the following elements.
* @return A Java Future containing the result of the ViewBilling operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InvalidInputException The requested item is not acceptable. For example, for APIs that accept a
* domain name, the request might specify a domain name that doesn't belong to the account that submitted
* the request. For
AcceptDomainTransferFromAnotherAwsAccount
, the password might be invalid.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - Route53DomainsException Base class for all service exceptions. Unknown exceptions will be thrown as
* an instance of this type.
*
* @sample Route53DomainsAsyncClient.ViewBilling
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture viewBilling(ViewBillingRequest viewBillingRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(viewBillingRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, viewBillingRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Route 53 Domains");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ViewBilling");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ViewBillingResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ViewBilling").withProtocolMetadata(protocolMetadata)
.withMarshaller(new ViewBillingRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(viewBillingRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
@Override
public final Route53DomainsServiceClientConfiguration serviceClientConfiguration() {
return new Route53DomainsServiceClientConfigurationBuilder(this.clientConfiguration.toBuilder()).build();
}
@Override
public final String serviceName() {
return SERVICE_NAME;
}
private > T init(T builder) {
return builder
.clientConfiguration(clientConfiguration)
.defaultServiceExceptionSupplier(Route53DomainsException::builder)
.protocol(AwsJsonProtocol.AWS_JSON)
.protocolVersion("1.1")
.registerModeledException(
ExceptionMetadata.builder().errorCode("DuplicateRequest")
.exceptionBuilderSupplier(DuplicateRequestException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("OperationLimitExceeded")
.exceptionBuilderSupplier(OperationLimitExceededException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("UnsupportedTLD")
.exceptionBuilderSupplier(UnsupportedTldException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("DnssecLimitExceeded")
.exceptionBuilderSupplier(DnssecLimitExceededException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidInput")
.exceptionBuilderSupplier(InvalidInputException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("DomainLimitExceeded")
.exceptionBuilderSupplier(DomainLimitExceededException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("TLDRulesViolation")
.exceptionBuilderSupplier(TldRulesViolationException::builder).httpStatusCode(400).build());
}
private static List resolveMetricPublishers(SdkClientConfiguration clientConfiguration,
RequestOverrideConfiguration requestOverrideConfiguration) {
List publishers = null;
if (requestOverrideConfiguration != null) {
publishers = requestOverrideConfiguration.metricPublishers();
}
if (publishers == null || publishers.isEmpty()) {
publishers = clientConfiguration.option(SdkClientOption.METRIC_PUBLISHERS);
}
if (publishers == null) {
publishers = Collections.emptyList();
}
return publishers;
}
private void updateRetryStrategyClientConfiguration(SdkClientConfiguration.Builder configuration) {
ClientOverrideConfiguration.Builder builder = configuration.asOverrideConfigurationBuilder();
RetryMode retryMode = builder.retryMode();
if (retryMode != null) {
configuration.option(SdkClientOption.RETRY_STRATEGY, AwsRetryStrategy.forRetryMode(retryMode));
} else {
Consumer> configurator = builder.retryStrategyConfigurator();
if (configurator != null) {
RetryStrategy.Builder, ?> defaultBuilder = AwsRetryStrategy.defaultRetryStrategy().toBuilder();
configurator.accept(defaultBuilder);
configuration.option(SdkClientOption.RETRY_STRATEGY, defaultBuilder.build());
} else {
RetryStrategy retryStrategy = builder.retryStrategy();
if (retryStrategy != null) {
configuration.option(SdkClientOption.RETRY_STRATEGY, retryStrategy);
}
}
}
configuration.option(SdkClientOption.CONFIGURED_RETRY_MODE, null);
configuration.option(SdkClientOption.CONFIGURED_RETRY_STRATEGY, null);
configuration.option(SdkClientOption.CONFIGURED_RETRY_CONFIGURATOR, null);
}
private SdkClientConfiguration updateSdkClientConfiguration(SdkRequest request, SdkClientConfiguration clientConfiguration) {
List plugins = request.overrideConfiguration().map(c -> c.plugins()).orElse(Collections.emptyList());
SdkClientConfiguration.Builder configuration = clientConfiguration.toBuilder();
if (plugins.isEmpty()) {
return configuration.build();
}
Route53DomainsServiceClientConfigurationBuilder serviceConfigBuilder = new Route53DomainsServiceClientConfigurationBuilder(
configuration);
for (SdkPlugin plugin : plugins) {
plugin.configureClient(serviceConfigBuilder);
}
updateRetryStrategyClientConfiguration(configuration);
return configuration.build();
}
private HttpResponseHandler createErrorResponseHandler(BaseAwsJsonProtocolFactory protocolFactory,
JsonOperationMetadata operationMetadata) {
return protocolFactory.createErrorResponseHandler(operationMetadata);
}
@Override
public void close() {
clientHandler.close();
}
}