software.amazon.awssdk.services.ses.DefaultSesAsyncClient Maven / Gradle / Ivy
/*
* Copyright 2014-2019 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.ses;
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.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.awscore.client.handler.AwsAsyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.ApiName;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
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.util.VersionInfo;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.query.AwsQueryProtocolFactory;
import software.amazon.awssdk.services.ses.model.AccountSendingPausedException;
import software.amazon.awssdk.services.ses.model.AlreadyExistsException;
import software.amazon.awssdk.services.ses.model.CannotDeleteException;
import software.amazon.awssdk.services.ses.model.CloneReceiptRuleSetRequest;
import software.amazon.awssdk.services.ses.model.CloneReceiptRuleSetResponse;
import software.amazon.awssdk.services.ses.model.ConfigurationSetAlreadyExistsException;
import software.amazon.awssdk.services.ses.model.ConfigurationSetDoesNotExistException;
import software.amazon.awssdk.services.ses.model.ConfigurationSetSendingPausedException;
import software.amazon.awssdk.services.ses.model.CreateConfigurationSetEventDestinationRequest;
import software.amazon.awssdk.services.ses.model.CreateConfigurationSetEventDestinationResponse;
import software.amazon.awssdk.services.ses.model.CreateConfigurationSetRequest;
import software.amazon.awssdk.services.ses.model.CreateConfigurationSetResponse;
import software.amazon.awssdk.services.ses.model.CreateConfigurationSetTrackingOptionsRequest;
import software.amazon.awssdk.services.ses.model.CreateConfigurationSetTrackingOptionsResponse;
import software.amazon.awssdk.services.ses.model.CreateCustomVerificationEmailTemplateRequest;
import software.amazon.awssdk.services.ses.model.CreateCustomVerificationEmailTemplateResponse;
import software.amazon.awssdk.services.ses.model.CreateReceiptFilterRequest;
import software.amazon.awssdk.services.ses.model.CreateReceiptFilterResponse;
import software.amazon.awssdk.services.ses.model.CreateReceiptRuleRequest;
import software.amazon.awssdk.services.ses.model.CreateReceiptRuleResponse;
import software.amazon.awssdk.services.ses.model.CreateReceiptRuleSetRequest;
import software.amazon.awssdk.services.ses.model.CreateReceiptRuleSetResponse;
import software.amazon.awssdk.services.ses.model.CreateTemplateRequest;
import software.amazon.awssdk.services.ses.model.CreateTemplateResponse;
import software.amazon.awssdk.services.ses.model.CustomVerificationEmailInvalidContentException;
import software.amazon.awssdk.services.ses.model.CustomVerificationEmailTemplateAlreadyExistsException;
import software.amazon.awssdk.services.ses.model.CustomVerificationEmailTemplateDoesNotExistException;
import software.amazon.awssdk.services.ses.model.DeleteConfigurationSetEventDestinationRequest;
import software.amazon.awssdk.services.ses.model.DeleteConfigurationSetEventDestinationResponse;
import software.amazon.awssdk.services.ses.model.DeleteConfigurationSetRequest;
import software.amazon.awssdk.services.ses.model.DeleteConfigurationSetResponse;
import software.amazon.awssdk.services.ses.model.DeleteConfigurationSetTrackingOptionsRequest;
import software.amazon.awssdk.services.ses.model.DeleteConfigurationSetTrackingOptionsResponse;
import software.amazon.awssdk.services.ses.model.DeleteCustomVerificationEmailTemplateRequest;
import software.amazon.awssdk.services.ses.model.DeleteCustomVerificationEmailTemplateResponse;
import software.amazon.awssdk.services.ses.model.DeleteIdentityPolicyRequest;
import software.amazon.awssdk.services.ses.model.DeleteIdentityPolicyResponse;
import software.amazon.awssdk.services.ses.model.DeleteIdentityRequest;
import software.amazon.awssdk.services.ses.model.DeleteIdentityResponse;
import software.amazon.awssdk.services.ses.model.DeleteReceiptFilterRequest;
import software.amazon.awssdk.services.ses.model.DeleteReceiptFilterResponse;
import software.amazon.awssdk.services.ses.model.DeleteReceiptRuleRequest;
import software.amazon.awssdk.services.ses.model.DeleteReceiptRuleResponse;
import software.amazon.awssdk.services.ses.model.DeleteReceiptRuleSetRequest;
import software.amazon.awssdk.services.ses.model.DeleteReceiptRuleSetResponse;
import software.amazon.awssdk.services.ses.model.DeleteTemplateRequest;
import software.amazon.awssdk.services.ses.model.DeleteTemplateResponse;
import software.amazon.awssdk.services.ses.model.DeleteVerifiedEmailAddressRequest;
import software.amazon.awssdk.services.ses.model.DeleteVerifiedEmailAddressResponse;
import software.amazon.awssdk.services.ses.model.DescribeActiveReceiptRuleSetRequest;
import software.amazon.awssdk.services.ses.model.DescribeActiveReceiptRuleSetResponse;
import software.amazon.awssdk.services.ses.model.DescribeConfigurationSetRequest;
import software.amazon.awssdk.services.ses.model.DescribeConfigurationSetResponse;
import software.amazon.awssdk.services.ses.model.DescribeReceiptRuleRequest;
import software.amazon.awssdk.services.ses.model.DescribeReceiptRuleResponse;
import software.amazon.awssdk.services.ses.model.DescribeReceiptRuleSetRequest;
import software.amazon.awssdk.services.ses.model.DescribeReceiptRuleSetResponse;
import software.amazon.awssdk.services.ses.model.EventDestinationAlreadyExistsException;
import software.amazon.awssdk.services.ses.model.EventDestinationDoesNotExistException;
import software.amazon.awssdk.services.ses.model.FromEmailAddressNotVerifiedException;
import software.amazon.awssdk.services.ses.model.GetAccountSendingEnabledRequest;
import software.amazon.awssdk.services.ses.model.GetAccountSendingEnabledResponse;
import software.amazon.awssdk.services.ses.model.GetCustomVerificationEmailTemplateRequest;
import software.amazon.awssdk.services.ses.model.GetCustomVerificationEmailTemplateResponse;
import software.amazon.awssdk.services.ses.model.GetIdentityDkimAttributesRequest;
import software.amazon.awssdk.services.ses.model.GetIdentityDkimAttributesResponse;
import software.amazon.awssdk.services.ses.model.GetIdentityMailFromDomainAttributesRequest;
import software.amazon.awssdk.services.ses.model.GetIdentityMailFromDomainAttributesResponse;
import software.amazon.awssdk.services.ses.model.GetIdentityNotificationAttributesRequest;
import software.amazon.awssdk.services.ses.model.GetIdentityNotificationAttributesResponse;
import software.amazon.awssdk.services.ses.model.GetIdentityPoliciesRequest;
import software.amazon.awssdk.services.ses.model.GetIdentityPoliciesResponse;
import software.amazon.awssdk.services.ses.model.GetIdentityVerificationAttributesRequest;
import software.amazon.awssdk.services.ses.model.GetIdentityVerificationAttributesResponse;
import software.amazon.awssdk.services.ses.model.GetSendQuotaRequest;
import software.amazon.awssdk.services.ses.model.GetSendQuotaResponse;
import software.amazon.awssdk.services.ses.model.GetSendStatisticsRequest;
import software.amazon.awssdk.services.ses.model.GetSendStatisticsResponse;
import software.amazon.awssdk.services.ses.model.GetTemplateRequest;
import software.amazon.awssdk.services.ses.model.GetTemplateResponse;
import software.amazon.awssdk.services.ses.model.InvalidCloudWatchDestinationException;
import software.amazon.awssdk.services.ses.model.InvalidConfigurationSetException;
import software.amazon.awssdk.services.ses.model.InvalidDeliveryOptionsException;
import software.amazon.awssdk.services.ses.model.InvalidFirehoseDestinationException;
import software.amazon.awssdk.services.ses.model.InvalidLambdaFunctionException;
import software.amazon.awssdk.services.ses.model.InvalidPolicyException;
import software.amazon.awssdk.services.ses.model.InvalidRenderingParameterException;
import software.amazon.awssdk.services.ses.model.InvalidS3ConfigurationException;
import software.amazon.awssdk.services.ses.model.InvalidSnsDestinationException;
import software.amazon.awssdk.services.ses.model.InvalidSnsTopicException;
import software.amazon.awssdk.services.ses.model.InvalidTemplateException;
import software.amazon.awssdk.services.ses.model.InvalidTrackingOptionsException;
import software.amazon.awssdk.services.ses.model.LimitExceededException;
import software.amazon.awssdk.services.ses.model.ListConfigurationSetsRequest;
import software.amazon.awssdk.services.ses.model.ListConfigurationSetsResponse;
import software.amazon.awssdk.services.ses.model.ListCustomVerificationEmailTemplatesRequest;
import software.amazon.awssdk.services.ses.model.ListCustomVerificationEmailTemplatesResponse;
import software.amazon.awssdk.services.ses.model.ListIdentitiesRequest;
import software.amazon.awssdk.services.ses.model.ListIdentitiesResponse;
import software.amazon.awssdk.services.ses.model.ListIdentityPoliciesRequest;
import software.amazon.awssdk.services.ses.model.ListIdentityPoliciesResponse;
import software.amazon.awssdk.services.ses.model.ListReceiptFiltersRequest;
import software.amazon.awssdk.services.ses.model.ListReceiptFiltersResponse;
import software.amazon.awssdk.services.ses.model.ListReceiptRuleSetsRequest;
import software.amazon.awssdk.services.ses.model.ListReceiptRuleSetsResponse;
import software.amazon.awssdk.services.ses.model.ListTemplatesRequest;
import software.amazon.awssdk.services.ses.model.ListTemplatesResponse;
import software.amazon.awssdk.services.ses.model.ListVerifiedEmailAddressesRequest;
import software.amazon.awssdk.services.ses.model.ListVerifiedEmailAddressesResponse;
import software.amazon.awssdk.services.ses.model.MailFromDomainNotVerifiedException;
import software.amazon.awssdk.services.ses.model.MessageRejectedException;
import software.amazon.awssdk.services.ses.model.MissingRenderingAttributeException;
import software.amazon.awssdk.services.ses.model.ProductionAccessNotGrantedException;
import software.amazon.awssdk.services.ses.model.PutConfigurationSetDeliveryOptionsRequest;
import software.amazon.awssdk.services.ses.model.PutConfigurationSetDeliveryOptionsResponse;
import software.amazon.awssdk.services.ses.model.PutIdentityPolicyRequest;
import software.amazon.awssdk.services.ses.model.PutIdentityPolicyResponse;
import software.amazon.awssdk.services.ses.model.ReorderReceiptRuleSetRequest;
import software.amazon.awssdk.services.ses.model.ReorderReceiptRuleSetResponse;
import software.amazon.awssdk.services.ses.model.RuleDoesNotExistException;
import software.amazon.awssdk.services.ses.model.RuleSetDoesNotExistException;
import software.amazon.awssdk.services.ses.model.SendBounceRequest;
import software.amazon.awssdk.services.ses.model.SendBounceResponse;
import software.amazon.awssdk.services.ses.model.SendBulkTemplatedEmailRequest;
import software.amazon.awssdk.services.ses.model.SendBulkTemplatedEmailResponse;
import software.amazon.awssdk.services.ses.model.SendCustomVerificationEmailRequest;
import software.amazon.awssdk.services.ses.model.SendCustomVerificationEmailResponse;
import software.amazon.awssdk.services.ses.model.SendEmailRequest;
import software.amazon.awssdk.services.ses.model.SendEmailResponse;
import software.amazon.awssdk.services.ses.model.SendRawEmailRequest;
import software.amazon.awssdk.services.ses.model.SendRawEmailResponse;
import software.amazon.awssdk.services.ses.model.SendTemplatedEmailRequest;
import software.amazon.awssdk.services.ses.model.SendTemplatedEmailResponse;
import software.amazon.awssdk.services.ses.model.SesException;
import software.amazon.awssdk.services.ses.model.SesRequest;
import software.amazon.awssdk.services.ses.model.SetActiveReceiptRuleSetRequest;
import software.amazon.awssdk.services.ses.model.SetActiveReceiptRuleSetResponse;
import software.amazon.awssdk.services.ses.model.SetIdentityDkimEnabledRequest;
import software.amazon.awssdk.services.ses.model.SetIdentityDkimEnabledResponse;
import software.amazon.awssdk.services.ses.model.SetIdentityFeedbackForwardingEnabledRequest;
import software.amazon.awssdk.services.ses.model.SetIdentityFeedbackForwardingEnabledResponse;
import software.amazon.awssdk.services.ses.model.SetIdentityHeadersInNotificationsEnabledRequest;
import software.amazon.awssdk.services.ses.model.SetIdentityHeadersInNotificationsEnabledResponse;
import software.amazon.awssdk.services.ses.model.SetIdentityMailFromDomainRequest;
import software.amazon.awssdk.services.ses.model.SetIdentityMailFromDomainResponse;
import software.amazon.awssdk.services.ses.model.SetIdentityNotificationTopicRequest;
import software.amazon.awssdk.services.ses.model.SetIdentityNotificationTopicResponse;
import software.amazon.awssdk.services.ses.model.SetReceiptRulePositionRequest;
import software.amazon.awssdk.services.ses.model.SetReceiptRulePositionResponse;
import software.amazon.awssdk.services.ses.model.TemplateDoesNotExistException;
import software.amazon.awssdk.services.ses.model.TestRenderTemplateRequest;
import software.amazon.awssdk.services.ses.model.TestRenderTemplateResponse;
import software.amazon.awssdk.services.ses.model.TrackingOptionsAlreadyExistsException;
import software.amazon.awssdk.services.ses.model.TrackingOptionsDoesNotExistException;
import software.amazon.awssdk.services.ses.model.UpdateAccountSendingEnabledRequest;
import software.amazon.awssdk.services.ses.model.UpdateAccountSendingEnabledResponse;
import software.amazon.awssdk.services.ses.model.UpdateConfigurationSetEventDestinationRequest;
import software.amazon.awssdk.services.ses.model.UpdateConfigurationSetEventDestinationResponse;
import software.amazon.awssdk.services.ses.model.UpdateConfigurationSetReputationMetricsEnabledRequest;
import software.amazon.awssdk.services.ses.model.UpdateConfigurationSetReputationMetricsEnabledResponse;
import software.amazon.awssdk.services.ses.model.UpdateConfigurationSetSendingEnabledRequest;
import software.amazon.awssdk.services.ses.model.UpdateConfigurationSetSendingEnabledResponse;
import software.amazon.awssdk.services.ses.model.UpdateConfigurationSetTrackingOptionsRequest;
import software.amazon.awssdk.services.ses.model.UpdateConfigurationSetTrackingOptionsResponse;
import software.amazon.awssdk.services.ses.model.UpdateCustomVerificationEmailTemplateRequest;
import software.amazon.awssdk.services.ses.model.UpdateCustomVerificationEmailTemplateResponse;
import software.amazon.awssdk.services.ses.model.UpdateReceiptRuleRequest;
import software.amazon.awssdk.services.ses.model.UpdateReceiptRuleResponse;
import software.amazon.awssdk.services.ses.model.UpdateTemplateRequest;
import software.amazon.awssdk.services.ses.model.UpdateTemplateResponse;
import software.amazon.awssdk.services.ses.model.VerifyDomainDkimRequest;
import software.amazon.awssdk.services.ses.model.VerifyDomainDkimResponse;
import software.amazon.awssdk.services.ses.model.VerifyDomainIdentityRequest;
import software.amazon.awssdk.services.ses.model.VerifyDomainIdentityResponse;
import software.amazon.awssdk.services.ses.model.VerifyEmailAddressRequest;
import software.amazon.awssdk.services.ses.model.VerifyEmailAddressResponse;
import software.amazon.awssdk.services.ses.model.VerifyEmailIdentityRequest;
import software.amazon.awssdk.services.ses.model.VerifyEmailIdentityResponse;
import software.amazon.awssdk.services.ses.paginators.ListCustomVerificationEmailTemplatesPublisher;
import software.amazon.awssdk.services.ses.paginators.ListIdentitiesPublisher;
import software.amazon.awssdk.services.ses.transform.CloneReceiptRuleSetRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.CreateConfigurationSetEventDestinationRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.CreateConfigurationSetRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.CreateConfigurationSetTrackingOptionsRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.CreateCustomVerificationEmailTemplateRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.CreateReceiptFilterRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.CreateReceiptRuleRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.CreateReceiptRuleSetRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.CreateTemplateRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.DeleteConfigurationSetEventDestinationRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.DeleteConfigurationSetRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.DeleteConfigurationSetTrackingOptionsRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.DeleteCustomVerificationEmailTemplateRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.DeleteIdentityPolicyRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.DeleteIdentityRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.DeleteReceiptFilterRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.DeleteReceiptRuleRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.DeleteReceiptRuleSetRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.DeleteTemplateRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.DeleteVerifiedEmailAddressRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.DescribeActiveReceiptRuleSetRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.DescribeConfigurationSetRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.DescribeReceiptRuleRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.DescribeReceiptRuleSetRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.GetAccountSendingEnabledRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.GetCustomVerificationEmailTemplateRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.GetIdentityDkimAttributesRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.GetIdentityMailFromDomainAttributesRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.GetIdentityNotificationAttributesRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.GetIdentityPoliciesRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.GetIdentityVerificationAttributesRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.GetSendQuotaRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.GetSendStatisticsRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.GetTemplateRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.ListConfigurationSetsRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.ListCustomVerificationEmailTemplatesRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.ListIdentitiesRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.ListIdentityPoliciesRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.ListReceiptFiltersRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.ListReceiptRuleSetsRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.ListTemplatesRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.ListVerifiedEmailAddressesRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.PutConfigurationSetDeliveryOptionsRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.PutIdentityPolicyRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.ReorderReceiptRuleSetRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.SendBounceRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.SendBulkTemplatedEmailRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.SendCustomVerificationEmailRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.SendEmailRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.SendRawEmailRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.SendTemplatedEmailRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.SetActiveReceiptRuleSetRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.SetIdentityDkimEnabledRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.SetIdentityFeedbackForwardingEnabledRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.SetIdentityHeadersInNotificationsEnabledRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.SetIdentityMailFromDomainRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.SetIdentityNotificationTopicRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.SetReceiptRulePositionRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.TestRenderTemplateRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.UpdateAccountSendingEnabledRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.UpdateConfigurationSetEventDestinationRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.UpdateConfigurationSetReputationMetricsEnabledRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.UpdateConfigurationSetSendingEnabledRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.UpdateConfigurationSetTrackingOptionsRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.UpdateCustomVerificationEmailTemplateRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.UpdateReceiptRuleRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.UpdateTemplateRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.VerifyDomainDkimRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.VerifyDomainIdentityRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.VerifyEmailAddressRequestMarshaller;
import software.amazon.awssdk.services.ses.transform.VerifyEmailIdentityRequestMarshaller;
import software.amazon.awssdk.utils.CompletableFutureUtils;
/**
* Internal implementation of {@link SesAsyncClient}.
*
* @see SesAsyncClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultSesAsyncClient implements SesAsyncClient {
private static final Logger log = LoggerFactory.getLogger(DefaultSesAsyncClient.class);
private final AsyncClientHandler clientHandler;
private final AwsQueryProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
protected DefaultSesAsyncClient(SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsAsyncClientHandler(clientConfiguration);
this.clientConfiguration = clientConfiguration;
this.protocolFactory = init();
}
@Override
public final String serviceName() {
return SERVICE_NAME;
}
/**
*
* Creates a receipt rule set by cloning an existing one. All receipt rules and configurations are copied to the new
* receipt rule set and are completely independent of the source rule set.
*
*
* For information about setting up rule sets, see the Amazon SES
* Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param cloneReceiptRuleSetRequest
* Represents a request to create a receipt rule set by cloning an existing one. You use receipt rule sets to
* receive email with Amazon SES. For more information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the CloneReceiptRuleSet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - RuleSetDoesNotExistException Indicates that the provided receipt rule set does not exist.
* - AlreadyExistsException Indicates that a resource could not be created because of a naming conflict.
* - LimitExceededException Indicates that a resource could not be created because of service limits. For
* a list of Amazon SES limits, see the Amazon SES Developer Guide.
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.CloneReceiptRuleSet
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture cloneReceiptRuleSet(
CloneReceiptRuleSetRequest cloneReceiptRuleSetRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CloneReceiptRuleSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CloneReceiptRuleSet")
.withMarshaller(new CloneReceiptRuleSetRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(cloneReceiptRuleSetRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a configuration set.
*
*
* Configuration sets enable you to publish email sending events. For information about using configuration sets,
* see the Amazon SES
* Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param createConfigurationSetRequest
* Represents a request to create a configuration set. Configuration sets enable you to publish email sending
* events. For information about using configuration sets, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the CreateConfigurationSet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ConfigurationSetAlreadyExistsException Indicates that the configuration set could not be created
* because of a naming conflict.
* - InvalidConfigurationSetException Indicates that the configuration set is invalid. See the error
* message for details.
* - LimitExceededException Indicates that a resource could not be created because of service limits. For
* a list of Amazon SES limits, see the Amazon SES Developer Guide.
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.CreateConfigurationSet
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture createConfigurationSet(
CreateConfigurationSetRequest createConfigurationSetRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateConfigurationSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateConfigurationSet")
.withMarshaller(new CreateConfigurationSetRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createConfigurationSetRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a configuration set event destination.
*
*
*
* When you create or update an event destination, you must provide one, and only one, destination. The destination
* can be CloudWatch, Amazon Kinesis Firehose, or Amazon Simple Notification Service (Amazon SNS).
*
*
*
* An event destination is the AWS service to which Amazon SES publishes the email sending events associated with a
* configuration set. For information about using configuration sets, see the Amazon SES Developer
* Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param createConfigurationSetEventDestinationRequest
* Represents a request to create a configuration set event destination. A configuration set event
* destination, which can be either Amazon CloudWatch or Amazon Kinesis Firehose, describes an AWS service in
* which Amazon SES publishes the email sending events associated with a configuration set. For information
* about using configuration sets, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the CreateConfigurationSetEventDestination operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ConfigurationSetDoesNotExistException Indicates that the configuration set does not exist.
* - EventDestinationAlreadyExistsException Indicates that the event destination could not be created
* because of a naming conflict.
* - InvalidCloudWatchDestinationException Indicates that the Amazon CloudWatch destination is invalid.
* See the error message for details.
* - InvalidFirehoseDestinationException Indicates that the Amazon Kinesis Firehose destination is
* invalid. See the error message for details.
* - InvalidSnsDestinationException Indicates that the Amazon Simple Notification Service (Amazon SNS)
* destination is invalid. See the error message for details.
* - LimitExceededException Indicates that a resource could not be created because of service limits. For
* a list of Amazon SES limits, see the Amazon SES Developer Guide.
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.CreateConfigurationSetEventDestination
* @see AWS API Documentation
*/
@Override
public CompletableFuture createConfigurationSetEventDestination(
CreateConfigurationSetEventDestinationRequest createConfigurationSetEventDestinationRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateConfigurationSetEventDestinationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateConfigurationSetEventDestination")
.withMarshaller(new CreateConfigurationSetEventDestinationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createConfigurationSetEventDestinationRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates an association between a configuration set and a custom domain for open and click event tracking.
*
*
* By default, images and links used for tracking open and click events are hosted on domains operated by Amazon
* SES. You can configure a subdomain of your own to handle these events. For information about using custom
* domains, see the Amazon SES
* Developer Guide.
*
*
* @param createConfigurationSetTrackingOptionsRequest
* Represents a request to create an open and click tracking option object in a configuration set.
* @return A Java Future containing the result of the CreateConfigurationSetTrackingOptions operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ConfigurationSetDoesNotExistException Indicates that the configuration set does not exist.
* - TrackingOptionsAlreadyExistsException Indicates that the configuration set you specified already
* contains a TrackingOptions object.
* - InvalidTrackingOptionsException Indicates that the custom domain to be used for open and click
* tracking redirects is invalid. This error appears most often in the following situations:
*
* -
*
* When the tracking domain you specified is not verified in Amazon SES.
*
*
* -
*
* When the tracking domain you specified is not a valid domain or subdomain.
*
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.CreateConfigurationSetTrackingOptions
* @see AWS API Documentation
*/
@Override
public CompletableFuture createConfigurationSetTrackingOptions(
CreateConfigurationSetTrackingOptionsRequest createConfigurationSetTrackingOptionsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateConfigurationSetTrackingOptionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateConfigurationSetTrackingOptions")
.withMarshaller(new CreateConfigurationSetTrackingOptionsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createConfigurationSetTrackingOptionsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a new custom verification email template.
*
*
* For more information about custom verification email templates, see Using Custom
* Verification Email Templates in the Amazon SES Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param createCustomVerificationEmailTemplateRequest
* Represents a request to create a custom verification email template.
* @return A Java Future containing the result of the CreateCustomVerificationEmailTemplate operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CustomVerificationEmailTemplateAlreadyExistsException Indicates that a custom verification email
* template with the name you specified already exists.
* - FromEmailAddressNotVerifiedException Indicates that the sender address specified for a custom
* verification email is not verified, and is therefore not eligible to send the custom verification email.
* - CustomVerificationEmailInvalidContentException Indicates that custom verification email template
* provided content is invalid.
* - LimitExceededException Indicates that a resource could not be created because of service limits. For
* a list of Amazon SES limits, see the Amazon SES Developer Guide.
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.CreateCustomVerificationEmailTemplate
* @see AWS API Documentation
*/
@Override
public CompletableFuture createCustomVerificationEmailTemplate(
CreateCustomVerificationEmailTemplateRequest createCustomVerificationEmailTemplateRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateCustomVerificationEmailTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateCustomVerificationEmailTemplate")
.withMarshaller(new CreateCustomVerificationEmailTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createCustomVerificationEmailTemplateRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a new IP address filter.
*
*
* For information about setting up IP address filters, see the Amazon SES Developer
* Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param createReceiptFilterRequest
* Represents a request to create a new IP address filter. You use IP address filters when you receive email
* with Amazon SES. For more information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the CreateReceiptFilter operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - LimitExceededException Indicates that a resource could not be created because of service limits. For
* a list of Amazon SES limits, see the Amazon SES Developer Guide.
* - AlreadyExistsException Indicates that a resource could not be created because of a naming conflict.
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.CreateReceiptFilter
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture createReceiptFilter(
CreateReceiptFilterRequest createReceiptFilterRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateReceiptFilterResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateReceiptFilter")
.withMarshaller(new CreateReceiptFilterRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createReceiptFilterRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a receipt rule.
*
*
* For information about setting up receipt rules, see the Amazon SES
* Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param createReceiptRuleRequest
* Represents a request to create a receipt rule. You use receipt rules to receive email with Amazon SES. For
* more information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the CreateReceiptRule operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidSnsTopicException Indicates that the provided Amazon SNS topic is invalid, or that Amazon SES
* could not publish to the topic, possibly due to permissions issues. For information about giving
* permissions, see the Amazon SES
* Developer Guide.
* - InvalidS3ConfigurationException Indicates that the provided Amazon S3 bucket or AWS KMS encryption
* key is invalid, or that Amazon SES could not publish to the bucket, possibly due to permissions issues.
* For information about giving permissions, see the Amazon SES
* Developer Guide.
* - InvalidLambdaFunctionException Indicates that the provided AWS Lambda function is invalid, or that
* Amazon SES could not execute the provided function, possibly due to permissions issues. For information
* about giving permissions, see the Amazon SES
* Developer Guide.
* - AlreadyExistsException Indicates that a resource could not be created because of a naming conflict.
* - RuleDoesNotExistException Indicates that the provided receipt rule does not exist.
* - RuleSetDoesNotExistException Indicates that the provided receipt rule set does not exist.
* - LimitExceededException Indicates that a resource could not be created because of service limits. For
* a list of Amazon SES limits, see the Amazon SES Developer Guide.
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.CreateReceiptRule
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture createReceiptRule(CreateReceiptRuleRequest createReceiptRuleRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateReceiptRuleResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateReceiptRule")
.withMarshaller(new CreateReceiptRuleRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createReceiptRuleRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates an empty receipt rule set.
*
*
* For information about setting up receipt rule sets, see the Amazon SES
* Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param createReceiptRuleSetRequest
* Represents a request to create an empty receipt rule set. You use receipt rule sets to receive email with
* Amazon SES. For more information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the CreateReceiptRuleSet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - AlreadyExistsException Indicates that a resource could not be created because of a naming conflict.
* - LimitExceededException Indicates that a resource could not be created because of service limits. For
* a list of Amazon SES limits, see the Amazon SES Developer Guide.
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.CreateReceiptRuleSet
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture createReceiptRuleSet(
CreateReceiptRuleSetRequest createReceiptRuleSetRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateReceiptRuleSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateReceiptRuleSet")
.withMarshaller(new CreateReceiptRuleSetRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createReceiptRuleSetRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates an email template. Email templates enable you to send personalized email to one or more destinations in a
* single API operation. For more information, see the Amazon SES
* Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param createTemplateRequest
* Represents a request to create an email template. For more information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the CreateTemplate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - AlreadyExistsException Indicates that a resource could not be created because of a naming conflict.
* - InvalidTemplateException Indicates that the template that you specified could not be rendered. This
* issue may occur when a template refers to a partial that does not exist.
* - LimitExceededException Indicates that a resource could not be created because of service limits. For
* a list of Amazon SES limits, see the Amazon SES Developer Guide.
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.CreateTemplate
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture createTemplate(CreateTemplateRequest createTemplateRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateTemplate")
.withMarshaller(new CreateTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createTemplateRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a configuration set. Configuration sets enable you to publish email sending events. For information about
* using configuration sets, see the Amazon SES Developer
* Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param deleteConfigurationSetRequest
* Represents a request to delete a configuration set. Configuration sets enable you to publish email sending
* events. For information about using configuration sets, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the DeleteConfigurationSet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ConfigurationSetDoesNotExistException Indicates that the configuration set does not exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.DeleteConfigurationSet
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture deleteConfigurationSet(
DeleteConfigurationSetRequest deleteConfigurationSetRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteConfigurationSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConfigurationSet")
.withMarshaller(new DeleteConfigurationSetRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteConfigurationSetRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a configuration set event destination. Configuration set event destinations are associated with
* configuration sets, which enable you to publish email sending events. For information about using configuration
* sets, see the Amazon SES Developer
* Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param deleteConfigurationSetEventDestinationRequest
* Represents a request to delete a configuration set event destination. Configuration set event destinations
* are associated with configuration sets, which enable you to publish email sending events. For information
* about using configuration sets, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the DeleteConfigurationSetEventDestination operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ConfigurationSetDoesNotExistException Indicates that the configuration set does not exist.
* - EventDestinationDoesNotExistException Indicates that the event destination does not exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.DeleteConfigurationSetEventDestination
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteConfigurationSetEventDestination(
DeleteConfigurationSetEventDestinationRequest deleteConfigurationSetEventDestinationRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteConfigurationSetEventDestinationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConfigurationSetEventDestination")
.withMarshaller(new DeleteConfigurationSetEventDestinationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteConfigurationSetEventDestinationRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes an association between a configuration set and a custom domain for open and click event tracking.
*
*
* By default, images and links used for tracking open and click events are hosted on domains operated by Amazon
* SES. You can configure a subdomain of your own to handle these events. For information about using custom
* domains, see the Amazon SES
* Developer Guide.
*
*
*
* Deleting this kind of association will result in emails sent using the specified configuration set to capture
* open and click events using the standard, Amazon SES-operated domains.
*
*
*
* @param deleteConfigurationSetTrackingOptionsRequest
* Represents a request to delete open and click tracking options in a configuration set.
* @return A Java Future containing the result of the DeleteConfigurationSetTrackingOptions operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ConfigurationSetDoesNotExistException Indicates that the configuration set does not exist.
* - TrackingOptionsDoesNotExistException Indicates that the TrackingOptions object you specified does not
* exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.DeleteConfigurationSetTrackingOptions
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteConfigurationSetTrackingOptions(
DeleteConfigurationSetTrackingOptionsRequest deleteConfigurationSetTrackingOptionsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteConfigurationSetTrackingOptionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConfigurationSetTrackingOptions")
.withMarshaller(new DeleteConfigurationSetTrackingOptionsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteConfigurationSetTrackingOptionsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes an existing custom verification email template.
*
*
* For more information about custom verification email templates, see Using Custom
* Verification Email Templates in the Amazon SES Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param deleteCustomVerificationEmailTemplateRequest
* Represents a request to delete an existing custom verification email template.
* @return A Java Future containing the result of the DeleteCustomVerificationEmailTemplate operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.DeleteCustomVerificationEmailTemplate
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteCustomVerificationEmailTemplate(
DeleteCustomVerificationEmailTemplateRequest deleteCustomVerificationEmailTemplateRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteCustomVerificationEmailTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteCustomVerificationEmailTemplate")
.withMarshaller(new DeleteCustomVerificationEmailTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteCustomVerificationEmailTemplateRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the specified identity (an email address or a domain) from the list of verified identities.
*
*
* You can execute this operation no more than once per second.
*
*
* @param deleteIdentityRequest
* Represents a request to delete one of your Amazon SES identities (an email address or domain).
* @return A Java Future containing the result of the DeleteIdentity operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.DeleteIdentity
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture deleteIdentity(DeleteIdentityRequest deleteIdentityRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteIdentityResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteIdentity")
.withMarshaller(new DeleteIdentityRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteIdentityRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the specified sending authorization policy for the given identity (an email address or a domain). This
* API returns successfully even if a policy with the specified name does not exist.
*
*
*
* This API is for the identity owner only. If you have not verified the identity, this API will return an error.
*
*
*
* Sending authorization is a feature that enables an identity owner to authorize other senders to use its
* identities. For information about using sending authorization, see the Amazon SES Developer
* Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param deleteIdentityPolicyRequest
* Represents a request to delete a sending authorization policy for an identity. Sending authorization is an
* Amazon SES feature that enables you to authorize other senders to use your identities. For information,
* see the Amazon
* SES Developer Guide.
* @return A Java Future containing the result of the DeleteIdentityPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.DeleteIdentityPolicy
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture deleteIdentityPolicy(
DeleteIdentityPolicyRequest deleteIdentityPolicyRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteIdentityPolicyResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteIdentityPolicy")
.withMarshaller(new DeleteIdentityPolicyRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteIdentityPolicyRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the specified IP address filter.
*
*
* For information about managing IP address filters, see the Amazon SES
* Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param deleteReceiptFilterRequest
* Represents a request to delete an IP address filter. You use IP address filters when you receive email
* with Amazon SES. For more information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the DeleteReceiptFilter operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.DeleteReceiptFilter
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture deleteReceiptFilter(
DeleteReceiptFilterRequest deleteReceiptFilterRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteReceiptFilterResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteReceiptFilter")
.withMarshaller(new DeleteReceiptFilterRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteReceiptFilterRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the specified receipt rule.
*
*
* For information about managing receipt rules, see the Amazon
* SES Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param deleteReceiptRuleRequest
* Represents a request to delete a receipt rule. You use receipt rules to receive email with Amazon SES. For
* more information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the DeleteReceiptRule operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - RuleSetDoesNotExistException Indicates that the provided receipt rule set does not exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.DeleteReceiptRule
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture deleteReceiptRule(DeleteReceiptRuleRequest deleteReceiptRuleRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteReceiptRuleResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteReceiptRule")
.withMarshaller(new DeleteReceiptRuleRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteReceiptRuleRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes the specified receipt rule set and all of the receipt rules it contains.
*
*
*
* The currently active rule set cannot be deleted.
*
*
*
* For information about managing receipt rule sets, see the Amazon SES Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param deleteReceiptRuleSetRequest
* Represents a request to delete a receipt rule set and all of the receipt rules it contains. You use
* receipt rule sets to receive email with Amazon SES. For more information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the DeleteReceiptRuleSet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CannotDeleteException Indicates that the delete operation could not be completed.
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.DeleteReceiptRuleSet
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture deleteReceiptRuleSet(
DeleteReceiptRuleSetRequest deleteReceiptRuleSetRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteReceiptRuleSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteReceiptRuleSet")
.withMarshaller(new DeleteReceiptRuleSetRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteReceiptRuleSetRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes an email template.
*
*
* You can execute this operation no more than once per second.
*
*
* @param deleteTemplateRequest
* Represents a request to delete an email template. For more information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the DeleteTemplate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.DeleteTemplate
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture deleteTemplate(DeleteTemplateRequest deleteTemplateRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteTemplate")
.withMarshaller(new DeleteTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteTemplateRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deprecated. Use the DeleteIdentity
operation to delete email addresses and domains.
*
*
* @param deleteVerifiedEmailAddressRequest
* Represents a request to delete an email address from the list of email addresses you have attempted to
* verify under your AWS account.
* @return A Java Future containing the result of the DeleteVerifiedEmailAddress operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.DeleteVerifiedEmailAddress
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteVerifiedEmailAddress(
DeleteVerifiedEmailAddressRequest deleteVerifiedEmailAddressRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteVerifiedEmailAddressResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteVerifiedEmailAddress")
.withMarshaller(new DeleteVerifiedEmailAddressRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteVerifiedEmailAddressRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the metadata and receipt rules for the receipt rule set that is currently active.
*
*
* For information about setting up receipt rule sets, see the Amazon SES
* Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param describeActiveReceiptRuleSetRequest
* Represents a request to return the metadata and receipt rules for the receipt rule set that is currently
* active. You use receipt rule sets to receive email with Amazon SES. For more information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the DescribeActiveReceiptRuleSet operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.DescribeActiveReceiptRuleSet
* @see AWS API Documentation
*/
@Override
public CompletableFuture describeActiveReceiptRuleSet(
DescribeActiveReceiptRuleSetRequest describeActiveReceiptRuleSetRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeActiveReceiptRuleSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeActiveReceiptRuleSet")
.withMarshaller(new DescribeActiveReceiptRuleSetRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeActiveReceiptRuleSetRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the details of the specified configuration set. For information about using configuration sets, see the
* Amazon SES
* Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param describeConfigurationSetRequest
* Represents a request to return the details of a configuration set. Configuration sets enable you to
* publish email sending events. For information about using configuration sets, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the DescribeConfigurationSet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ConfigurationSetDoesNotExistException Indicates that the configuration set does not exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.DescribeConfigurationSet
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture describeConfigurationSet(
DescribeConfigurationSetRequest describeConfigurationSetRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeConfigurationSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConfigurationSet")
.withMarshaller(new DescribeConfigurationSetRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeConfigurationSetRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the details of the specified receipt rule.
*
*
* For information about setting up receipt rules, see the Amazon SES
* Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param describeReceiptRuleRequest
* Represents a request to return the details of a receipt rule. You use receipt rules to receive email with
* Amazon SES. For more information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the DescribeReceiptRule operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - RuleDoesNotExistException Indicates that the provided receipt rule does not exist.
* - RuleSetDoesNotExistException Indicates that the provided receipt rule set does not exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.DescribeReceiptRule
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture describeReceiptRule(
DescribeReceiptRuleRequest describeReceiptRuleRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeReceiptRuleResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeReceiptRule")
.withMarshaller(new DescribeReceiptRuleRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeReceiptRuleRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the details of the specified receipt rule set.
*
*
* For information about managing receipt rule sets, see the Amazon SES Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param describeReceiptRuleSetRequest
* Represents a request to return the details of a receipt rule set. You use receipt rule sets to receive
* email with Amazon SES. For more information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the DescribeReceiptRuleSet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - RuleSetDoesNotExistException Indicates that the provided receipt rule set does not exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.DescribeReceiptRuleSet
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture describeReceiptRuleSet(
DescribeReceiptRuleSetRequest describeReceiptRuleSetRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeReceiptRuleSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeReceiptRuleSet")
.withMarshaller(new DescribeReceiptRuleSetRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeReceiptRuleSetRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the email sending status of the Amazon SES account for the current region.
*
*
* You can execute this operation no more than once per second.
*
*
* @param getAccountSendingEnabledRequest
* @return A Java Future containing the result of the GetAccountSendingEnabled operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.GetAccountSendingEnabled
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture getAccountSendingEnabled(
GetAccountSendingEnabledRequest getAccountSendingEnabledRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetAccountSendingEnabledResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetAccountSendingEnabled")
.withMarshaller(new GetAccountSendingEnabledRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(getAccountSendingEnabledRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the custom email verification template for the template name you specify.
*
*
* For more information about custom verification email templates, see Using Custom
* Verification Email Templates in the Amazon SES Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param getCustomVerificationEmailTemplateRequest
* Represents a request to retrieve an existing custom verification email template.
* @return A Java Future containing the result of the GetCustomVerificationEmailTemplate operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - CustomVerificationEmailTemplateDoesNotExistException Indicates that a custom verification email
* template with the name you specified does not exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.GetCustomVerificationEmailTemplate
* @see AWS API Documentation
*/
@Override
public CompletableFuture getCustomVerificationEmailTemplate(
GetCustomVerificationEmailTemplateRequest getCustomVerificationEmailTemplateRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetCustomVerificationEmailTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetCustomVerificationEmailTemplate")
.withMarshaller(new GetCustomVerificationEmailTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(getCustomVerificationEmailTemplateRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the current status of Easy DKIM signing for an entity. For domain name identities, this operation also
* returns the DKIM tokens that are required for Easy DKIM signing, and whether Amazon SES has successfully verified
* that these tokens have been published.
*
*
* This operation takes a list of identities as input and returns the following information for each:
*
*
* -
*
* Whether Easy DKIM signing is enabled or disabled.
*
*
* -
*
* A set of DKIM tokens that represent the identity. If the identity is an email address, the tokens represent the
* domain of that address.
*
*
* -
*
* Whether Amazon SES has successfully verified the DKIM tokens published in the domain's DNS. This information is
* only returned for domain name identities, not for email addresses.
*
*
*
*
* This operation is throttled at one request per second and can only get DKIM attributes for up to 100 identities
* at a time.
*
*
* For more information about creating DNS records using DKIM tokens, go to the Amazon SES Developer
* Guide.
*
*
* @param getIdentityDkimAttributesRequest
* Represents a request for the status of Amazon SES Easy DKIM signing for an identity. For domain
* identities, this request also returns the DKIM tokens that are required for Easy DKIM signing, and whether
* Amazon SES successfully verified that these tokens were published. For more information about Easy DKIM,
* see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the GetIdentityDkimAttributes operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.GetIdentityDkimAttributes
* @see AWS API Documentation
*/
@Override
public CompletableFuture getIdentityDkimAttributes(
GetIdentityDkimAttributesRequest getIdentityDkimAttributesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetIdentityDkimAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetIdentityDkimAttributes")
.withMarshaller(new GetIdentityDkimAttributesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(getIdentityDkimAttributesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the custom MAIL FROM attributes for a list of identities (email addresses : domains).
*
*
* This operation is throttled at one request per second and can only get custom MAIL FROM attributes for up to 100
* identities at a time.
*
*
* @param getIdentityMailFromDomainAttributesRequest
* Represents a request to return the Amazon SES custom MAIL FROM attributes for a list of identities. For
* information about using a custom MAIL FROM domain, see the Amazon SES Developer
* Guide.
* @return A Java Future containing the result of the GetIdentityMailFromDomainAttributes operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.GetIdentityMailFromDomainAttributes
* @see AWS API Documentation
*/
@Override
public CompletableFuture getIdentityMailFromDomainAttributes(
GetIdentityMailFromDomainAttributesRequest getIdentityMailFromDomainAttributesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetIdentityMailFromDomainAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetIdentityMailFromDomainAttributes")
.withMarshaller(new GetIdentityMailFromDomainAttributesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(getIdentityMailFromDomainAttributesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Given a list of verified identities (email addresses and/or domains), returns a structure describing identity
* notification attributes.
*
*
* This operation is throttled at one request per second and can only get notification attributes for up to 100
* identities at a time.
*
*
* For more information about using notifications with Amazon SES, see the Amazon SES Developer Guide.
*
*
* @param getIdentityNotificationAttributesRequest
* Represents a request to return the notification attributes for a list of identities you verified with
* Amazon SES. For information about Amazon SES notifications, see the Amazon SES Developer
* Guide.
* @return A Java Future containing the result of the GetIdentityNotificationAttributes operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.GetIdentityNotificationAttributes
* @see AWS API Documentation
*/
@Override
public CompletableFuture getIdentityNotificationAttributes(
GetIdentityNotificationAttributesRequest getIdentityNotificationAttributesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetIdentityNotificationAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetIdentityNotificationAttributes")
.withMarshaller(new GetIdentityNotificationAttributesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(getIdentityNotificationAttributesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns the requested sending authorization policies for the given identity (an email address or a domain). The
* policies are returned as a map of policy names to policy contents. You can retrieve a maximum of 20 policies at a
* time.
*
*
*
* This API is for the identity owner only. If you have not verified the identity, this API will return an error.
*
*
*
* Sending authorization is a feature that enables an identity owner to authorize other senders to use its
* identities. For information about using sending authorization, see the Amazon SES Developer
* Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param getIdentityPoliciesRequest
* Represents a request to return the requested sending authorization policies for an identity. Sending
* authorization is an Amazon SES feature that enables you to authorize other senders to use your identities.
* For information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the GetIdentityPolicies operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.GetIdentityPolicies
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture getIdentityPolicies(
GetIdentityPoliciesRequest getIdentityPoliciesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetIdentityPoliciesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetIdentityPolicies")
.withMarshaller(new GetIdentityPoliciesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(getIdentityPoliciesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Given a list of identities (email addresses and/or domains), returns the verification status and (for domain
* identities) the verification token for each identity.
*
*
* The verification status of an email address is "Pending" until the email address owner clicks the link within the
* verification email that Amazon SES sent to that address. If the email address owner clicks the link within 24
* hours, the verification status of the email address changes to "Success". If the link is not clicked within 24
* hours, the verification status changes to "Failed." In that case, if you still want to verify the email address,
* you must restart the verification process from the beginning.
*
*
* For domain identities, the domain's verification status is "Pending" as Amazon SES searches for the required TXT
* record in the DNS settings of the domain. When Amazon SES detects the record, the domain's verification status
* changes to "Success". If Amazon SES is unable to detect the record within 72 hours, the domain's verification
* status changes to "Failed." In that case, if you still want to verify the domain, you must restart the
* verification process from the beginning.
*
*
* This operation is throttled at one request per second and can only get verification attributes for up to 100
* identities at a time.
*
*
* @param getIdentityVerificationAttributesRequest
* Represents a request to return the Amazon SES verification status of a list of identities. For domain
* identities, this request also returns the verification token. For information about verifying identities
* with Amazon SES, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the GetIdentityVerificationAttributes operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.GetIdentityVerificationAttributes
* @see AWS API Documentation
*/
@Override
public CompletableFuture getIdentityVerificationAttributes(
GetIdentityVerificationAttributesRequest getIdentityVerificationAttributesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetIdentityVerificationAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetIdentityVerificationAttributes")
.withMarshaller(new GetIdentityVerificationAttributesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(getIdentityVerificationAttributesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Provides the sending limits for the Amazon SES account.
*
*
* You can execute this operation no more than once per second.
*
*
* @param getSendQuotaRequest
* @return A Java Future containing the result of the GetSendQuota operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.GetSendQuota
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture getSendQuota(GetSendQuotaRequest getSendQuotaRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetSendQuotaResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetSendQuota").withMarshaller(new GetSendQuotaRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(getSendQuotaRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Provides sending statistics for the current AWS Region. The result is a list of data points, representing the
* last two weeks of sending activity. Each data point in the list contains statistics for a 15-minute period of
* time.
*
*
* You can execute this operation no more than once per second.
*
*
* @param getSendStatisticsRequest
* @return A Java Future containing the result of the GetSendStatistics operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.GetSendStatistics
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture getSendStatistics(GetSendStatisticsRequest getSendStatisticsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetSendStatisticsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetSendStatistics")
.withMarshaller(new GetSendStatisticsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(getSendStatisticsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Displays the template object (which includes the Subject line, HTML part and text part) for the template you
* specify.
*
*
* You can execute this operation no more than once per second.
*
*
* @param getTemplateRequest
* @return A Java Future containing the result of the GetTemplate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - TemplateDoesNotExistException Indicates that the Template object you specified does not exist in your
* Amazon SES 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.GetTemplate
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture getTemplate(GetTemplateRequest getTemplateRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetTemplate").withMarshaller(new GetTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(getTemplateRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Provides a list of the configuration sets associated with your Amazon SES account in the current AWS Region. For
* information about using configuration sets, see Monitoring Your Amazon
* SES Sending Activity in the Amazon SES Developer Guide.
*
*
* You can execute this operation no more than once per second. This operation will return up to 1,000 configuration
* sets each time it is run. If your Amazon SES account has more than 1,000 configuration sets, this operation will
* also return a NextToken element. You can then execute the ListConfigurationSets
operation again,
* passing the NextToken
parameter and the value of the NextToken element to retrieve additional
* results.
*
*
* @param listConfigurationSetsRequest
* Represents a request to list the configuration sets associated with your AWS account. Configuration sets
* enable you to publish email sending events. For information about using configuration sets, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the ListConfigurationSets operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.ListConfigurationSets
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture listConfigurationSets(
ListConfigurationSetsRequest listConfigurationSetsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListConfigurationSetsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListConfigurationSets")
.withMarshaller(new ListConfigurationSetsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listConfigurationSetsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Lists the existing custom verification email templates for your account in the current AWS Region.
*
*
* For more information about custom verification email templates, see Using Custom
* Verification Email Templates in the Amazon SES Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param listCustomVerificationEmailTemplatesRequest
* Represents a request to list the existing custom verification email templates for your account.
*
* For more information about custom verification email templates, see Using Custom
* Verification Email Templates in the Amazon SES Developer Guide.
* @return A Java Future containing the result of the ListCustomVerificationEmailTemplates operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
- SesException Base class for all service
* exceptions. Unknown exceptions will be thrown as an instance of this type.
*
* @sample SesAsyncClient.ListCustomVerificationEmailTemplates
* @see AWS API Documentation
*/
@Override
public CompletableFuture listCustomVerificationEmailTemplates(
ListCustomVerificationEmailTemplatesRequest listCustomVerificationEmailTemplatesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListCustomVerificationEmailTemplatesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListCustomVerificationEmailTemplates")
.withMarshaller(new ListCustomVerificationEmailTemplatesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listCustomVerificationEmailTemplatesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Lists the existing custom verification email templates for your account in the current AWS Region.
*
*
* For more information about custom verification email templates, see Using Custom
* Verification Email Templates in the Amazon SES Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
*
* This is a variant of
* {@link #listCustomVerificationEmailTemplates(software.amazon.awssdk.services.ses.model.ListCustomVerificationEmailTemplatesRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.ses.paginators.ListCustomVerificationEmailTemplatesPublisher publisher = client.listCustomVerificationEmailTemplatesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.ses.paginators.ListCustomVerificationEmailTemplatesPublisher publisher = client.listCustomVerificationEmailTemplatesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.ses.model.ListCustomVerificationEmailTemplatesResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Note: If you prefer to have control on service calls, use the
* {@link #listCustomVerificationEmailTemplates(software.amazon.awssdk.services.ses.model.ListCustomVerificationEmailTemplatesRequest)}
* operation.
*
*
* @param listCustomVerificationEmailTemplatesRequest
* Represents a request to list the existing custom verification email templates for your account.
*
* For more information about custom verification email templates, see Using Custom
* Verification Email Templates in the Amazon SES Developer Guide.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
- SesException Base class for all service
* exceptions. Unknown exceptions will be thrown as an instance of this type.
*
* @sample SesAsyncClient.ListCustomVerificationEmailTemplates
* @see AWS API Documentation
*/
public ListCustomVerificationEmailTemplatesPublisher listCustomVerificationEmailTemplatesPaginator(
ListCustomVerificationEmailTemplatesRequest listCustomVerificationEmailTemplatesRequest) {
return new ListCustomVerificationEmailTemplatesPublisher(this,
applyPaginatorUserAgent(listCustomVerificationEmailTemplatesRequest));
}
/**
*
* Returns a list containing all of the identities (email addresses and domains) for your AWS account in the current
* AWS Region, regardless of verification status.
*
*
* You can execute this operation no more than once per second.
*
*
* @param listIdentitiesRequest
* Represents a request to return a list of all identities (email addresses and domains) that you have
* attempted to verify under your AWS account, regardless of verification status.
* @return A Java Future containing the result of the ListIdentities operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.ListIdentities
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture listIdentities(ListIdentitiesRequest listIdentitiesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListIdentitiesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListIdentities")
.withMarshaller(new ListIdentitiesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listIdentitiesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns a list containing all of the identities (email addresses and domains) for your AWS account in the current
* AWS Region, regardless of verification status.
*
*
* You can execute this operation no more than once per second.
*
*
*
* This is a variant of {@link #listIdentities(software.amazon.awssdk.services.ses.model.ListIdentitiesRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.ses.paginators.ListIdentitiesPublisher publisher = client.listIdentitiesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.ses.paginators.ListIdentitiesPublisher publisher = client.listIdentitiesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.ses.model.ListIdentitiesResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Note: If you prefer to have control on service calls, use the
* {@link #listIdentities(software.amazon.awssdk.services.ses.model.ListIdentitiesRequest)} operation.
*
*
* @param listIdentitiesRequest
* Represents a request to return a list of all identities (email addresses and domains) that you have
* attempted to verify under your AWS account, regardless of verification status.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.ListIdentities
* @see AWS API
* Documentation
*/
public ListIdentitiesPublisher listIdentitiesPaginator(ListIdentitiesRequest listIdentitiesRequest) {
return new ListIdentitiesPublisher(this, applyPaginatorUserAgent(listIdentitiesRequest));
}
/**
*
* Returns a list of sending authorization policies that are attached to the given identity (an email address or a
* domain). This API returns only a list. If you want the actual policy content, you can use
* GetIdentityPolicies
.
*
*
*
* This API is for the identity owner only. If you have not verified the identity, this API will return an error.
*
*
*
* Sending authorization is a feature that enables an identity owner to authorize other senders to use its
* identities. For information about using sending authorization, see the Amazon SES Developer
* Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param listIdentityPoliciesRequest
* Represents a request to return a list of sending authorization policies that are attached to an identity.
* Sending authorization is an Amazon SES feature that enables you to authorize other senders to use your
* identities. For information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the ListIdentityPolicies operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.ListIdentityPolicies
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture listIdentityPolicies(
ListIdentityPoliciesRequest listIdentityPoliciesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListIdentityPoliciesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListIdentityPolicies")
.withMarshaller(new ListIdentityPoliciesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listIdentityPoliciesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Lists the IP address filters associated with your AWS account in the current AWS Region.
*
*
* For information about managing IP address filters, see the Amazon SES
* Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param listReceiptFiltersRequest
* Represents a request to list the IP address filters that exist under your AWS account. You use IP address
* filters when you receive email with Amazon SES. For more information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the ListReceiptFilters operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.ListReceiptFilters
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture listReceiptFilters(ListReceiptFiltersRequest listReceiptFiltersRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListReceiptFiltersResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListReceiptFilters")
.withMarshaller(new ListReceiptFiltersRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listReceiptFiltersRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Lists the receipt rule sets that exist under your AWS account in the current AWS Region. If there are additional
* receipt rule sets to be retrieved, you will receive a NextToken
that you can provide to the next
* call to ListReceiptRuleSets
to retrieve the additional entries.
*
*
* For information about managing receipt rule sets, see the Amazon SES Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param listReceiptRuleSetsRequest
* Represents a request to list the receipt rule sets that exist under your AWS account. You use receipt rule
* sets to receive email with Amazon SES. For more information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the ListReceiptRuleSets operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.ListReceiptRuleSets
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture listReceiptRuleSets(
ListReceiptRuleSetsRequest listReceiptRuleSetsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListReceiptRuleSetsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListReceiptRuleSets")
.withMarshaller(new ListReceiptRuleSetsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listReceiptRuleSetsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Lists the email templates present in your Amazon SES account in the current AWS Region.
*
*
* You can execute this operation no more than once per second.
*
*
* @param listTemplatesRequest
* @return A Java Future containing the result of the ListTemplates operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.ListTemplates
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture listTemplates(ListTemplatesRequest listTemplatesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListTemplatesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListTemplates")
.withMarshaller(new ListTemplatesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listTemplatesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deprecated. Use the ListIdentities
operation to list the email addresses and domains associated with
* your account.
*
*
* @param listVerifiedEmailAddressesRequest
* @return A Java Future containing the result of the ListVerifiedEmailAddresses operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.ListVerifiedEmailAddresses
* @see AWS API Documentation
*/
@Override
public CompletableFuture listVerifiedEmailAddresses(
ListVerifiedEmailAddressesRequest listVerifiedEmailAddressesRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListVerifiedEmailAddressesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListVerifiedEmailAddresses")
.withMarshaller(new ListVerifiedEmailAddressesRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listVerifiedEmailAddressesRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Adds or updates the delivery options for a configuration set.
*
*
* @param putConfigurationSetDeliveryOptionsRequest
* A request to modify the delivery options for a configuration set.
* @return A Java Future containing the result of the PutConfigurationSetDeliveryOptions operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ConfigurationSetDoesNotExistException Indicates that the configuration set does not exist.
* - InvalidDeliveryOptionsException Indicates that provided delivery option is invalid.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.PutConfigurationSetDeliveryOptions
* @see AWS API Documentation
*/
@Override
public CompletableFuture putConfigurationSetDeliveryOptions(
PutConfigurationSetDeliveryOptionsRequest putConfigurationSetDeliveryOptionsRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(PutConfigurationSetDeliveryOptionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("PutConfigurationSetDeliveryOptions")
.withMarshaller(new PutConfigurationSetDeliveryOptionsRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(putConfigurationSetDeliveryOptionsRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Adds or updates a sending authorization policy for the specified identity (an email address or a domain).
*
*
*
* This API is for the identity owner only. If you have not verified the identity, this API will return an error.
*
*
*
* Sending authorization is a feature that enables an identity owner to authorize other senders to use its
* identities. For information about using sending authorization, see the Amazon SES Developer
* Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param putIdentityPolicyRequest
* Represents a request to add or update a sending authorization policy for an identity. Sending
* authorization is an Amazon SES feature that enables you to authorize other senders to use your identities.
* For information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the PutIdentityPolicy operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - InvalidPolicyException Indicates that the provided policy is invalid. Check the error stack for more
* information about what caused the error.
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.PutIdentityPolicy
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture putIdentityPolicy(PutIdentityPolicyRequest putIdentityPolicyRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(PutIdentityPolicyResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("PutIdentityPolicy")
.withMarshaller(new PutIdentityPolicyRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(putIdentityPolicyRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Reorders the receipt rules within a receipt rule set.
*
*
*
* All of the rules in the rule set must be represented in this request. That is, this API will return an error if
* the reorder request doesn't explicitly position all of the rules.
*
*
*
* For information about managing receipt rule sets, see the Amazon SES Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param reorderReceiptRuleSetRequest
* Represents a request to reorder the receipt rules within a receipt rule set. You use receipt rule sets to
* receive email with Amazon SES. For more information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the ReorderReceiptRuleSet operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - RuleSetDoesNotExistException Indicates that the provided receipt rule set does not exist.
* - RuleDoesNotExistException Indicates that the provided receipt rule does not exist.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.ReorderReceiptRuleSet
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture reorderReceiptRuleSet(
ReorderReceiptRuleSetRequest reorderReceiptRuleSetRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ReorderReceiptRuleSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ReorderReceiptRuleSet")
.withMarshaller(new ReorderReceiptRuleSetRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(reorderReceiptRuleSetRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Generates and sends a bounce message to the sender of an email you received through Amazon SES. You can only use
* this API on an email up to 24 hours after you receive it.
*
*
*
* You cannot use this API to send generic bounces for mail that was not received by Amazon SES.
*
*
*
* For information about receiving email through Amazon SES, see the Amazon SES Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param sendBounceRequest
* Represents a request to send a bounce message to the sender of an email you received through Amazon SES.
* @return A Java Future containing the result of the SendBounce operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - MessageRejectedException Indicates that the action failed, and the message could not be sent. Check
* the error stack for more information about what caused the error.
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.SendBounce
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture sendBounce(SendBounceRequest sendBounceRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SendBounceResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams().withOperationName("SendBounce")
.withMarshaller(new SendBounceRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(sendBounceRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Composes an email message to multiple destinations. The message body is created using an email template.
*
*
* In order to send email using the SendBulkTemplatedEmail
operation, your call to the API must meet
* the following requirements:
*
*
* -
*
* The call must refer to an existing email template. You can create email templates using the CreateTemplate
* operation.
*
*
* -
*
* The message must be sent from a verified email address or domain.
*
*
* -
*
* If your account is still in the Amazon SES sandbox, you may only send to verified addresses or domains, or to
* email addresses associated with the Amazon SES Mailbox Simulator. For more information, see Verifying Email
* Addresses and Domains in the Amazon SES Developer Guide.
*
*
* -
*
* The maximum message size is 10 MB.
*
*
* -
*
* Each Destination
parameter must include at least one recipient email address. The recipient address
* can be a To: address, a CC: address, or a BCC: address. If a recipient email address is invalid (that is, it is
* not in the format UserName@[SubDomain.]Domain.TopLevelDomain), the entire message will be rejected, even
* if the message contains other recipients that are valid.
*
*
* -
*
* The message may not include more than 50 recipients, across the To:, CC: and BCC: fields. If you need to send an
* email message to a larger audience, you can divide your recipient list into groups of 50 or fewer, and then call
* the SendBulkTemplatedEmail
operation several times to send the message to each group.
*
*
* -
*
* The number of destinations you can contact in a single call to the API may be limited by your account's maximum
* sending rate.
*
*
*
*
* @param sendBulkTemplatedEmailRequest
* Represents a request to send a templated email to multiple destinations using Amazon SES. For more
* information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the SendBulkTemplatedEmail operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - MessageRejectedException Indicates that the action failed, and the message could not be sent. Check
* the error stack for more information about what caused the error.
* - MailFromDomainNotVerifiedException Indicates that the message could not be sent because Amazon SES
* could not read the MX record required to use the specified MAIL FROM domain. For information about
* editing the custom MAIL FROM domain settings for an identity, see the Amazon SES Developer
* Guide.
* - ConfigurationSetDoesNotExistException Indicates that the configuration set does not exist.
* - TemplateDoesNotExistException Indicates that the Template object you specified does not exist in your
* Amazon SES account.
* - ConfigurationSetSendingPausedException Indicates that email sending is disabled for the configuration
* set.
*
* You can enable or disable email sending for a configuration set using
* UpdateConfigurationSetSendingEnabled.
* - AccountSendingPausedException Indicates that email sending is disabled for your entire Amazon SES
* account.
*
* You can enable or disable email sending for your Amazon SES account using
* UpdateAccountSendingEnabled.
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.SendBulkTemplatedEmail
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture sendBulkTemplatedEmail(
SendBulkTemplatedEmailRequest sendBulkTemplatedEmailRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SendBulkTemplatedEmailResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("SendBulkTemplatedEmail")
.withMarshaller(new SendBulkTemplatedEmailRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(sendBulkTemplatedEmailRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Adds an email address to the list of identities for your Amazon SES account in the current AWS Region and
* attempts to verify it. As a result of executing this operation, a customized verification email is sent to the
* specified address.
*
*
* To use this operation, you must first create a custom verification email template. For more information about
* creating and using custom verification email templates, see Using Custom
* Verification Email Templates in the Amazon SES Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param sendCustomVerificationEmailRequest
* Represents a request to send a custom verification email to a specified recipient.
* @return A Java Future containing the result of the SendCustomVerificationEmail operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - MessageRejectedException Indicates that the action failed, and the message could not be sent. Check
* the error stack for more information about what caused the error.
* - ConfigurationSetDoesNotExistException Indicates that the configuration set does not exist.
* - CustomVerificationEmailTemplateDoesNotExistException Indicates that a custom verification email
* template with the name you specified does not exist.
* - FromEmailAddressNotVerifiedException Indicates that the sender address specified for a custom
* verification email is not verified, and is therefore not eligible to send the custom verification email.
* - ProductionAccessNotGrantedException Indicates that the account has not been granted production
* access.
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.SendCustomVerificationEmail
* @see AWS API Documentation
*/
@Override
public CompletableFuture sendCustomVerificationEmail(
SendCustomVerificationEmailRequest sendCustomVerificationEmailRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SendCustomVerificationEmailResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("SendCustomVerificationEmail")
.withMarshaller(new SendCustomVerificationEmailRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(sendCustomVerificationEmailRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Composes an email message and immediately queues it for sending. In order to send email using the
* SendEmail
operation, your message must meet the following requirements:
*
*
* -
*
* The message must be sent from a verified email address or domain. If you attempt to send email using a
* non-verified address or domain, the operation will result in an "Email address not verified" error.
*
*
* -
*
* If your account is still in the Amazon SES sandbox, you may only send to verified addresses or domains, or to
* email addresses associated with the Amazon SES Mailbox Simulator. For more information, see Verifying Email
* Addresses and Domains in the Amazon SES Developer Guide.
*
*
* -
*
* The maximum message size is 10 MB.
*
*
* -
*
* The message must include at least one recipient email address. The recipient address can be a To: address, a CC:
* address, or a BCC: address. If a recipient email address is invalid (that is, it is not in the format
* UserName@[SubDomain.]Domain.TopLevelDomain), the entire message will be rejected, even if the message
* contains other recipients that are valid.
*
*
* -
*
* The message may not include more than 50 recipients, across the To:, CC: and BCC: fields. If you need to send an
* email message to a larger audience, you can divide your recipient list into groups of 50 or fewer, and then call
* the SendEmail
operation several times to send the message to each group.
*
*
*
*
*
* For every message that you send, the total number of recipients (including each recipient in the To:, CC: and
* BCC: fields) is counted against the maximum number of emails you can send in a 24-hour period (your sending
* quota). For more information about sending quotas in Amazon SES, see Managing Your Amazon SES
* Sending Limits in the Amazon SES Developer Guide.
*
*
*
* @param sendEmailRequest
* Represents a request to send a single formatted email using Amazon SES. For more information, see the Amazon SES
* Developer Guide.
* @return A Java Future containing the result of the SendEmail operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - MessageRejectedException Indicates that the action failed, and the message could not be sent. Check
* the error stack for more information about what caused the error.
* - MailFromDomainNotVerifiedException Indicates that the message could not be sent because Amazon SES
* could not read the MX record required to use the specified MAIL FROM domain. For information about
* editing the custom MAIL FROM domain settings for an identity, see the Amazon SES Developer
* Guide.
* - ConfigurationSetDoesNotExistException Indicates that the configuration set does not exist.
* - ConfigurationSetSendingPausedException Indicates that email sending is disabled for the configuration
* set.
*
* You can enable or disable email sending for a configuration set using
* UpdateConfigurationSetSendingEnabled.
* - AccountSendingPausedException Indicates that email sending is disabled for your entire Amazon SES
* account.
*
* You can enable or disable email sending for your Amazon SES account using
* UpdateAccountSendingEnabled.
* - 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.
* - SesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance
* of this type.
*
* @sample SesAsyncClient.SendEmail
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture sendEmail(SendEmailRequest sendEmailRequest) {
try {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SendEmailResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams().withOperationName("SendEmail")
.withMarshaller(new SendEmailRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(sendEmailRequest));
return executeFuture;
} catch (Throwable t) {
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Composes an email message and immediately queues it for sending.
*
*
* This operation is more flexible than the SendEmail
API operation. When you use the
* SendRawEmail
operation, you can specify the headers of the message as well as its content. This
* flexibility is useful, for example, when you want to send a multipart MIME email (such a message that contains
* both a text and an HTML version). You can also use this operation to send messages that include attachments.
*
*
* The SendRawEmail
operation has the following requirements:
*
*
* -
*
* You can only send email from verified email
* addresses or domains. If you try to send email from an address that isn't verified, the operation results in
* an "Email address not verified" error.
*
*
* -
*
* If your account is still in the Amazon SES
* sandbox, you can only send email to other verified addresses in your account, or to addresses that are
* associated with the Amazon
* SES mailbox simulator.
*
*
* -
*
* The maximum message size, including attachments, is 10 MB.
*
*
* -
*
* Each message has to include at least one recipient address. A recipient address includes any address on the To:,
* CC:, or BCC: lines.
*
*
* -
*
* If you send a single message to more than one recipient address, and one of the recipient addresses isn't in a
* valid format (that is, it's not in the format UserName@[SubDomain.]Domain.TopLevelDomain), Amazon SES
* rejects the entire message, even if the other addresses are valid.
*
*
* -
*
* Each message can include up to 50 recipient addresses across the To:, CC:, or BCC: lines. If you need to send a
* single message to more than 50 recipients, you have to split the list of recipient addresses into groups of less
* than 50 recipients, and send separate messages to each group.
*
*
* -
*
* Amazon SES allows you to specify 8-bit Content-Transfer-Encoding for MIME message parts. However, if Amazon SES
* has to modify the contents of your message (for example, if you use open and click tracking), 8-bit content isn't
* preserved. For this reason, we highly recommend that you encode all content that isn't 7-bit ASCII. For more
* information, see MIME
* Encoding in the Amazon SES Developer Guide.
*
*
*
*
* Additionally, keep the following considerations in mind when using the SendRawEmail
operation:
*
*
* -
*
* Although you can customize the message headers when using the SendRawEmail
operation, Amazon SES
* will automatically apply its own Message-ID
and Date
headers; if you passed these
* headers when creating the message, they will be overwritten by the values that Amazon SES provides.
*
*
* -
*
* If you are using sending authorization to send on behalf of another user, SendRawEmail
enables you
* to specify the cross-account identity for the email's Source, From, and Return-Path parameters in one of two
* ways: you can pass optional parameters SourceArn
, FromArn
, and/or
* ReturnPathArn
to the API, or you can include the following X-headers in the header of your raw
* email:
*
*
* -
*
*