software.amazon.awssdk.services.ses.DefaultSesClient Maven / Gradle / Ivy
Show all versions of ses Show documentation
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.ses;
import java.util.Collections;
import java.util.List;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.ApiName;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.client.handler.SyncClientHandler;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.util.VersionInfo;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
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.ListCustomVerificationEmailTemplatesIterable;
import software.amazon.awssdk.services.ses.paginators.ListIdentitiesIterable;
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;
/**
* Internal implementation of {@link SesClient}.
*
* @see SesClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultSesClient implements SesClient {
private final SyncClientHandler clientHandler;
private final AwsQueryProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
protected DefaultSesClient(SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsSyncClientHandler(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 Result of the CloneReceiptRuleSet operation returned by the service.
* @throws RuleSetDoesNotExistException
* Indicates that the provided receipt rule set does not exist.
* @throws AlreadyExistsException
* Indicates that a resource could not be created because of a naming conflict.
* @throws 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.CloneReceiptRuleSet
* @see AWS API
* Documentation
*/
@Override
public CloneReceiptRuleSetResponse cloneReceiptRuleSet(CloneReceiptRuleSetRequest cloneReceiptRuleSetRequest)
throws RuleSetDoesNotExistException, AlreadyExistsException, LimitExceededException, AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CloneReceiptRuleSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CloneReceiptRuleSet");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CloneReceiptRuleSet").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(cloneReceiptRuleSetRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CloneReceiptRuleSetRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, cloneReceiptRuleSetRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the CreateConfigurationSet operation returned by the service.
* @throws ConfigurationSetAlreadyExistsException
* Indicates that the configuration set could not be created because of a naming conflict.
* @throws InvalidConfigurationSetException
* Indicates that the configuration set is invalid. See the error message for details.
* @throws 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.CreateConfigurationSet
* @see AWS
* API Documentation
*/
@Override
public CreateConfigurationSetResponse createConfigurationSet(CreateConfigurationSetRequest createConfigurationSetRequest)
throws ConfigurationSetAlreadyExistsException, InvalidConfigurationSetException, LimitExceededException,
AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateConfigurationSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConfigurationSet");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateConfigurationSet").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createConfigurationSetRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateConfigurationSetRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, createConfigurationSetRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the CreateConfigurationSetEventDestination operation returned by the service.
* @throws ConfigurationSetDoesNotExistException
* Indicates that the configuration set does not exist.
* @throws EventDestinationAlreadyExistsException
* Indicates that the event destination could not be created because of a naming conflict.
* @throws InvalidCloudWatchDestinationException
* Indicates that the Amazon CloudWatch destination is invalid. See the error message for details.
* @throws InvalidFirehoseDestinationException
* Indicates that the Amazon Kinesis Firehose destination is invalid. See the error message for details.
* @throws InvalidSnsDestinationException
* Indicates that the Amazon Simple Notification Service (Amazon SNS) destination is invalid. See the error
* message for details.
* @throws 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.CreateConfigurationSetEventDestination
* @see AWS API Documentation
*/
@Override
public CreateConfigurationSetEventDestinationResponse createConfigurationSetEventDestination(
CreateConfigurationSetEventDestinationRequest createConfigurationSetEventDestinationRequest)
throws ConfigurationSetDoesNotExistException, EventDestinationAlreadyExistsException,
InvalidCloudWatchDestinationException, InvalidFirehoseDestinationException, InvalidSnsDestinationException,
LimitExceededException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateConfigurationSetEventDestinationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConfigurationSetEventDestination");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateConfigurationSetEventDestination").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler)
.withInput(createConfigurationSetEventDestinationRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateConfigurationSetEventDestinationRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
createConfigurationSetEventDestinationRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the CreateConfigurationSetTrackingOptions operation returned by the service.
* @throws ConfigurationSetDoesNotExistException
* Indicates that the configuration set does not exist.
* @throws TrackingOptionsAlreadyExistsException
* Indicates that the configuration set you specified already contains a TrackingOptions object.
* @throws 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.
*
*
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.CreateConfigurationSetTrackingOptions
* @see AWS API Documentation
*/
@Override
public CreateConfigurationSetTrackingOptionsResponse createConfigurationSetTrackingOptions(
CreateConfigurationSetTrackingOptionsRequest createConfigurationSetTrackingOptionsRequest)
throws ConfigurationSetDoesNotExistException, TrackingOptionsAlreadyExistsException, InvalidTrackingOptionsException,
AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateConfigurationSetTrackingOptionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConfigurationSetTrackingOptions");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateConfigurationSetTrackingOptions").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler)
.withInput(createConfigurationSetTrackingOptionsRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateConfigurationSetTrackingOptionsRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
createConfigurationSetTrackingOptionsRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the CreateCustomVerificationEmailTemplate operation returned by the service.
* @throws CustomVerificationEmailTemplateAlreadyExistsException
* Indicates that a custom verification email template with the name you specified already exists.
* @throws 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.
* @throws CustomVerificationEmailInvalidContentException
* Indicates that custom verification email template provided content is invalid.
* @throws 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.CreateCustomVerificationEmailTemplate
* @see AWS API Documentation
*/
@Override
public CreateCustomVerificationEmailTemplateResponse createCustomVerificationEmailTemplate(
CreateCustomVerificationEmailTemplateRequest createCustomVerificationEmailTemplateRequest)
throws CustomVerificationEmailTemplateAlreadyExistsException, FromEmailAddressNotVerifiedException,
CustomVerificationEmailInvalidContentException, LimitExceededException, AwsServiceException, SdkClientException,
SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateCustomVerificationEmailTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateCustomVerificationEmailTemplate");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateCustomVerificationEmailTemplate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler)
.withInput(createCustomVerificationEmailTemplateRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateCustomVerificationEmailTemplateRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
createCustomVerificationEmailTemplateRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the CreateReceiptFilter operation returned by the service.
* @throws 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.
* @throws AlreadyExistsException
* Indicates that a resource could not be created because of a naming conflict.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.CreateReceiptFilter
* @see AWS API
* Documentation
*/
@Override
public CreateReceiptFilterResponse createReceiptFilter(CreateReceiptFilterRequest createReceiptFilterRequest)
throws LimitExceededException, AlreadyExistsException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateReceiptFilterResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateReceiptFilter");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateReceiptFilter").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createReceiptFilterRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateReceiptFilterRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, createReceiptFilterRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the CreateReceiptRule operation returned by the service.
* @throws 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.
* @throws 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.
* @throws 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.
* @throws AlreadyExistsException
* Indicates that a resource could not be created because of a naming conflict.
* @throws RuleDoesNotExistException
* Indicates that the provided receipt rule does not exist.
* @throws RuleSetDoesNotExistException
* Indicates that the provided receipt rule set does not exist.
* @throws 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.CreateReceiptRule
* @see AWS API
* Documentation
*/
@Override
public CreateReceiptRuleResponse createReceiptRule(CreateReceiptRuleRequest createReceiptRuleRequest)
throws InvalidSnsTopicException, InvalidS3ConfigurationException, InvalidLambdaFunctionException,
AlreadyExistsException, RuleDoesNotExistException, RuleSetDoesNotExistException, LimitExceededException,
AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateReceiptRuleResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateReceiptRule");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateReceiptRule").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createReceiptRuleRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateReceiptRuleRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, createReceiptRuleRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the CreateReceiptRuleSet operation returned by the service.
* @throws AlreadyExistsException
* Indicates that a resource could not be created because of a naming conflict.
* @throws 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.CreateReceiptRuleSet
* @see AWS API
* Documentation
*/
@Override
public CreateReceiptRuleSetResponse createReceiptRuleSet(CreateReceiptRuleSetRequest createReceiptRuleSetRequest)
throws AlreadyExistsException, LimitExceededException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateReceiptRuleSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateReceiptRuleSet");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateReceiptRuleSet").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createReceiptRuleSetRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateReceiptRuleSetRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, createReceiptRuleSetRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the CreateTemplate operation returned by the service.
* @throws AlreadyExistsException
* Indicates that a resource could not be created because of a naming conflict.
* @throws 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.
* @throws 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.CreateTemplate
* @see AWS API
* Documentation
*/
@Override
public CreateTemplateResponse createTemplate(CreateTemplateRequest createTemplateRequest) throws AlreadyExistsException,
InvalidTemplateException, LimitExceededException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(CreateTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateTemplate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(createTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateTemplateRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, createTemplateRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DeleteConfigurationSet operation returned by the service.
* @throws ConfigurationSetDoesNotExistException
* Indicates that the configuration set does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.DeleteConfigurationSet
* @see AWS
* API Documentation
*/
@Override
public DeleteConfigurationSetResponse deleteConfigurationSet(DeleteConfigurationSetRequest deleteConfigurationSetRequest)
throws ConfigurationSetDoesNotExistException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteConfigurationSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConfigurationSet");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConfigurationSet").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteConfigurationSetRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteConfigurationSetRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteConfigurationSetRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DeleteConfigurationSetEventDestination operation returned by the service.
* @throws ConfigurationSetDoesNotExistException
* Indicates that the configuration set does not exist.
* @throws EventDestinationDoesNotExistException
* Indicates that the event destination does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.DeleteConfigurationSetEventDestination
* @see AWS API Documentation
*/
@Override
public DeleteConfigurationSetEventDestinationResponse deleteConfigurationSetEventDestination(
DeleteConfigurationSetEventDestinationRequest deleteConfigurationSetEventDestinationRequest)
throws ConfigurationSetDoesNotExistException, EventDestinationDoesNotExistException, AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteConfigurationSetEventDestinationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConfigurationSetEventDestination");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConfigurationSetEventDestination").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler)
.withInput(deleteConfigurationSetEventDestinationRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteConfigurationSetEventDestinationRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteConfigurationSetEventDestinationRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DeleteConfigurationSetTrackingOptions operation returned by the service.
* @throws ConfigurationSetDoesNotExistException
* Indicates that the configuration set does not exist.
* @throws TrackingOptionsDoesNotExistException
* Indicates that the TrackingOptions object you specified does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.DeleteConfigurationSetTrackingOptions
* @see AWS API Documentation
*/
@Override
public DeleteConfigurationSetTrackingOptionsResponse deleteConfigurationSetTrackingOptions(
DeleteConfigurationSetTrackingOptionsRequest deleteConfigurationSetTrackingOptionsRequest)
throws ConfigurationSetDoesNotExistException, TrackingOptionsDoesNotExistException, AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteConfigurationSetTrackingOptionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConfigurationSetTrackingOptions");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConfigurationSetTrackingOptions").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler)
.withInput(deleteConfigurationSetTrackingOptionsRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteConfigurationSetTrackingOptionsRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteConfigurationSetTrackingOptionsRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DeleteCustomVerificationEmailTemplate operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.DeleteCustomVerificationEmailTemplate
* @see AWS API Documentation
*/
@Override
public DeleteCustomVerificationEmailTemplateResponse deleteCustomVerificationEmailTemplate(
DeleteCustomVerificationEmailTemplateRequest deleteCustomVerificationEmailTemplateRequest)
throws AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteCustomVerificationEmailTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteCustomVerificationEmailTemplate");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteCustomVerificationEmailTemplate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler)
.withInput(deleteCustomVerificationEmailTemplateRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteCustomVerificationEmailTemplateRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteCustomVerificationEmailTemplateRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DeleteIdentity operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.DeleteIdentity
* @see AWS API
* Documentation
*/
@Override
public DeleteIdentityResponse deleteIdentity(DeleteIdentityRequest deleteIdentityRequest) throws AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteIdentityResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteIdentity");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteIdentity").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteIdentityRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteIdentityRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteIdentityRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DeleteIdentityPolicy operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.DeleteIdentityPolicy
* @see AWS API
* Documentation
*/
@Override
public DeleteIdentityPolicyResponse deleteIdentityPolicy(DeleteIdentityPolicyRequest deleteIdentityPolicyRequest)
throws AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteIdentityPolicyResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteIdentityPolicy");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteIdentityPolicy").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteIdentityPolicyRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteIdentityPolicyRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteIdentityPolicyRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DeleteReceiptFilter operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.DeleteReceiptFilter
* @see AWS API
* Documentation
*/
@Override
public DeleteReceiptFilterResponse deleteReceiptFilter(DeleteReceiptFilterRequest deleteReceiptFilterRequest)
throws AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteReceiptFilterResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteReceiptFilter");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteReceiptFilter").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteReceiptFilterRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteReceiptFilterRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteReceiptFilterRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DeleteReceiptRule operation returned by the service.
* @throws RuleSetDoesNotExistException
* Indicates that the provided receipt rule set does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.DeleteReceiptRule
* @see AWS API
* Documentation
*/
@Override
public DeleteReceiptRuleResponse deleteReceiptRule(DeleteReceiptRuleRequest deleteReceiptRuleRequest)
throws RuleSetDoesNotExistException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteReceiptRuleResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteReceiptRule");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteReceiptRule").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteReceiptRuleRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteReceiptRuleRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteReceiptRuleRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DeleteReceiptRuleSet operation returned by the service.
* @throws CannotDeleteException
* Indicates that the delete operation could not be completed.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.DeleteReceiptRuleSet
* @see AWS API
* Documentation
*/
@Override
public DeleteReceiptRuleSetResponse deleteReceiptRuleSet(DeleteReceiptRuleSetRequest deleteReceiptRuleSetRequest)
throws CannotDeleteException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteReceiptRuleSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteReceiptRuleSet");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteReceiptRuleSet").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteReceiptRuleSetRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteReceiptRuleSetRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteReceiptRuleSetRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DeleteTemplate operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.DeleteTemplate
* @see AWS API
* Documentation
*/
@Override
public DeleteTemplateResponse deleteTemplate(DeleteTemplateRequest deleteTemplateRequest) throws AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteTemplate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteTemplateRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteTemplateRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DeleteVerifiedEmailAddress operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.DeleteVerifiedEmailAddress
* @see AWS API Documentation
*/
@Override
public DeleteVerifiedEmailAddressResponse deleteVerifiedEmailAddress(
DeleteVerifiedEmailAddressRequest deleteVerifiedEmailAddressRequest) throws AwsServiceException, SdkClientException,
SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DeleteVerifiedEmailAddressResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteVerifiedEmailAddress");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteVerifiedEmailAddress").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(deleteVerifiedEmailAddressRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteVerifiedEmailAddressRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteVerifiedEmailAddressRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DescribeActiveReceiptRuleSet operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.DescribeActiveReceiptRuleSet
* @see AWS API Documentation
*/
@Override
public DescribeActiveReceiptRuleSetResponse describeActiveReceiptRuleSet(
DescribeActiveReceiptRuleSetRequest describeActiveReceiptRuleSetRequest) throws AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeActiveReceiptRuleSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeActiveReceiptRuleSet");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeActiveReceiptRuleSet").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(describeActiveReceiptRuleSetRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeActiveReceiptRuleSetRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeActiveReceiptRuleSetRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DescribeConfigurationSet operation returned by the service.
* @throws ConfigurationSetDoesNotExistException
* Indicates that the configuration set does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.DescribeConfigurationSet
* @see AWS
* API Documentation
*/
@Override
public DescribeConfigurationSetResponse describeConfigurationSet(
DescribeConfigurationSetRequest describeConfigurationSetRequest) throws ConfigurationSetDoesNotExistException,
AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeConfigurationSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeConfigurationSet");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConfigurationSet").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(describeConfigurationSetRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeConfigurationSetRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeConfigurationSetRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DescribeReceiptRule operation returned by the service.
* @throws RuleDoesNotExistException
* Indicates that the provided receipt rule does not exist.
* @throws RuleSetDoesNotExistException
* Indicates that the provided receipt rule set does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.DescribeReceiptRule
* @see AWS API
* Documentation
*/
@Override
public DescribeReceiptRuleResponse describeReceiptRule(DescribeReceiptRuleRequest describeReceiptRuleRequest)
throws RuleDoesNotExistException, RuleSetDoesNotExistException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeReceiptRuleResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeReceiptRule");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeReceiptRule").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(describeReceiptRuleRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeReceiptRuleRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeReceiptRuleRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the DescribeReceiptRuleSet operation returned by the service.
* @throws RuleSetDoesNotExistException
* Indicates that the provided receipt rule set does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.DescribeReceiptRuleSet
* @see AWS
* API Documentation
*/
@Override
public DescribeReceiptRuleSetResponse describeReceiptRuleSet(DescribeReceiptRuleSetRequest describeReceiptRuleSetRequest)
throws RuleSetDoesNotExistException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(DescribeReceiptRuleSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeReceiptRuleSet");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeReceiptRuleSet").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(describeReceiptRuleSetRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeReceiptRuleSetRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeReceiptRuleSetRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the GetAccountSendingEnabled operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.GetAccountSendingEnabled
* @see AWS
* API Documentation
*/
@Override
public GetAccountSendingEnabledResponse getAccountSendingEnabled(
GetAccountSendingEnabledRequest getAccountSendingEnabledRequest) throws AwsServiceException, SdkClientException,
SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetAccountSendingEnabledResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccountSendingEnabled");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetAccountSendingEnabled").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getAccountSendingEnabledRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetAccountSendingEnabledRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccountSendingEnabledRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the GetCustomVerificationEmailTemplate operation returned by the service.
* @throws CustomVerificationEmailTemplateDoesNotExistException
* Indicates that a custom verification email template with the name you specified does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.GetCustomVerificationEmailTemplate
* @see AWS API Documentation
*/
@Override
public GetCustomVerificationEmailTemplateResponse getCustomVerificationEmailTemplate(
GetCustomVerificationEmailTemplateRequest getCustomVerificationEmailTemplateRequest)
throws CustomVerificationEmailTemplateDoesNotExistException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetCustomVerificationEmailTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCustomVerificationEmailTemplate");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetCustomVerificationEmailTemplate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getCustomVerificationEmailTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetCustomVerificationEmailTemplateRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getCustomVerificationEmailTemplateRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the GetIdentityDkimAttributes operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.GetIdentityDkimAttributes
* @see AWS API Documentation
*/
@Override
public GetIdentityDkimAttributesResponse getIdentityDkimAttributes(
GetIdentityDkimAttributesRequest getIdentityDkimAttributesRequest) throws AwsServiceException, SdkClientException,
SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetIdentityDkimAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetIdentityDkimAttributes");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetIdentityDkimAttributes").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getIdentityDkimAttributesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetIdentityDkimAttributesRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getIdentityDkimAttributesRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the GetIdentityMailFromDomainAttributes operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.GetIdentityMailFromDomainAttributes
* @see AWS API Documentation
*/
@Override
public GetIdentityMailFromDomainAttributesResponse getIdentityMailFromDomainAttributes(
GetIdentityMailFromDomainAttributesRequest getIdentityMailFromDomainAttributesRequest) throws AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetIdentityMailFromDomainAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetIdentityMailFromDomainAttributes");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetIdentityMailFromDomainAttributes").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getIdentityMailFromDomainAttributesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetIdentityMailFromDomainAttributesRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getIdentityMailFromDomainAttributesRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the GetIdentityNotificationAttributes operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.GetIdentityNotificationAttributes
* @see AWS API Documentation
*/
@Override
public GetIdentityNotificationAttributesResponse getIdentityNotificationAttributes(
GetIdentityNotificationAttributesRequest getIdentityNotificationAttributesRequest) throws AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetIdentityNotificationAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetIdentityNotificationAttributes");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetIdentityNotificationAttributes").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getIdentityNotificationAttributesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetIdentityNotificationAttributesRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getIdentityNotificationAttributesRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the GetIdentityPolicies operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.GetIdentityPolicies
* @see AWS API
* Documentation
*/
@Override
public GetIdentityPoliciesResponse getIdentityPolicies(GetIdentityPoliciesRequest getIdentityPoliciesRequest)
throws AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetIdentityPoliciesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetIdentityPolicies");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetIdentityPolicies").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getIdentityPoliciesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetIdentityPoliciesRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, getIdentityPoliciesRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the GetIdentityVerificationAttributes operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.GetIdentityVerificationAttributes
* @see AWS API Documentation
*/
@Override
public GetIdentityVerificationAttributesResponse getIdentityVerificationAttributes(
GetIdentityVerificationAttributesRequest getIdentityVerificationAttributesRequest) throws AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetIdentityVerificationAttributesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetIdentityVerificationAttributes");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetIdentityVerificationAttributes").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getIdentityVerificationAttributesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetIdentityVerificationAttributesRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getIdentityVerificationAttributesRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Provides the sending limits for the Amazon SES account.
*
*
* You can execute this operation no more than once per second.
*
*
* @param getSendQuotaRequest
* @return Result of the GetSendQuota operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.GetSendQuota
* @see AWS API
* Documentation
*/
@Override
public GetSendQuotaResponse getSendQuota(GetSendQuotaRequest getSendQuotaRequest) throws AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetSendQuotaResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetSendQuota");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetSendQuota").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getSendQuotaRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetSendQuotaRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, getSendQuotaRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the GetSendStatistics operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.GetSendStatistics
* @see AWS API
* Documentation
*/
@Override
public GetSendStatisticsResponse getSendStatistics(GetSendStatisticsRequest getSendStatisticsRequest)
throws AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetSendStatisticsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetSendStatistics");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetSendStatistics").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getSendStatisticsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetSendStatisticsRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, getSendStatisticsRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the GetTemplate operation returned by the service.
* @throws TemplateDoesNotExistException
* Indicates that the Template object you specified does not exist in your Amazon SES account.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.GetTemplate
* @see AWS API
* Documentation
*/
@Override
public GetTemplateResponse getTemplate(GetTemplateRequest getTemplateRequest) throws TemplateDoesNotExistException,
AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(GetTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetTemplate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(getTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetTemplateRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, getTemplateRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the ListConfigurationSets operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.ListConfigurationSets
* @see AWS
* API Documentation
*/
@Override
public ListConfigurationSetsResponse listConfigurationSets(ListConfigurationSetsRequest listConfigurationSetsRequest)
throws AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListConfigurationSetsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListConfigurationSets");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListConfigurationSets").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listConfigurationSetsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListConfigurationSetsRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, listConfigurationSetsRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the ListCustomVerificationEmailTemplates operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.ListCustomVerificationEmailTemplates
* @see AWS API Documentation
*/
@Override
public ListCustomVerificationEmailTemplatesResponse listCustomVerificationEmailTemplates(
ListCustomVerificationEmailTemplatesRequest listCustomVerificationEmailTemplatesRequest) throws AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListCustomVerificationEmailTemplatesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListCustomVerificationEmailTemplates");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListCustomVerificationEmailTemplates").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler)
.withInput(listCustomVerificationEmailTemplatesRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListCustomVerificationEmailTemplatesRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
listCustomVerificationEmailTemplatesRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.ses.paginators.ListCustomVerificationEmailTemplatesIterable responses = client.listCustomVerificationEmailTemplatesPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.ses.paginators.ListCustomVerificationEmailTemplatesIterable responses = client
* .listCustomVerificationEmailTemplatesPaginator(request);
* for (software.amazon.awssdk.services.ses.model.ListCustomVerificationEmailTemplatesResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.ses.paginators.ListCustomVerificationEmailTemplatesIterable responses = client.listCustomVerificationEmailTemplatesPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* 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 iterable that can be used to iterate through all the response pages.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.ListCustomVerificationEmailTemplates
* @see AWS API Documentation
*/
@Override
public ListCustomVerificationEmailTemplatesIterable listCustomVerificationEmailTemplatesPaginator(
ListCustomVerificationEmailTemplatesRequest listCustomVerificationEmailTemplatesRequest) throws AwsServiceException,
SdkClientException, SesException {
return new ListCustomVerificationEmailTemplatesIterable(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 Result of the ListIdentities operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.ListIdentities
* @see AWS API
* Documentation
*/
@Override
public ListIdentitiesResponse listIdentities(ListIdentitiesRequest listIdentitiesRequest) throws AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListIdentitiesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListIdentities");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListIdentities").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listIdentitiesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListIdentitiesRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, listIdentitiesRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 iterable that can be used to iterate through all the pages. SDK will
* internally handle making service calls for you.
*
*
* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no
* guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response
* pages by making service calls until there are no pages left or your iteration stops. If there are errors in your
* request, you will see the failures only after you start iterating through the iterable.
*
*
*
* The following are few ways to iterate through the response pages:
*
* 1) Using a Stream
*
*
* {@code
* software.amazon.awssdk.services.ses.paginators.ListIdentitiesIterable responses = client.listIdentitiesPaginator(request);
* responses.stream().forEach(....);
* }
*
*
* 2) Using For loop
*
*
* {
* @code
* software.amazon.awssdk.services.ses.paginators.ListIdentitiesIterable responses = client.listIdentitiesPaginator(request);
* for (software.amazon.awssdk.services.ses.model.ListIdentitiesResponse response : responses) {
* // do something;
* }
* }
*
*
* 3) Use iterator directly
*
*
* {@code
* software.amazon.awssdk.services.ses.paginators.ListIdentitiesIterable responses = client.listIdentitiesPaginator(request);
* responses.iterator().forEachRemaining(....);
* }
*
*
* Please notice that the configuration of MaxItems won't limit the number of results you get with the paginator.
* It only limits the number of results in each page.
*
*
* 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 iterable that can be used to iterate through all the response pages.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.ListIdentities
* @see AWS API
* Documentation
*/
@Override
public ListIdentitiesIterable listIdentitiesPaginator(ListIdentitiesRequest listIdentitiesRequest)
throws AwsServiceException, SdkClientException, SesException {
return new ListIdentitiesIterable(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 Result of the ListIdentityPolicies operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.ListIdentityPolicies
* @see AWS API
* Documentation
*/
@Override
public ListIdentityPoliciesResponse listIdentityPolicies(ListIdentityPoliciesRequest listIdentityPoliciesRequest)
throws AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListIdentityPoliciesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListIdentityPolicies");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListIdentityPolicies").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listIdentityPoliciesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListIdentityPoliciesRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, listIdentityPoliciesRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the ListReceiptFilters operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.ListReceiptFilters
* @see AWS API
* Documentation
*/
@Override
public ListReceiptFiltersResponse listReceiptFilters(ListReceiptFiltersRequest listReceiptFiltersRequest)
throws AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListReceiptFiltersResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListReceiptFilters");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListReceiptFilters").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listReceiptFiltersRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListReceiptFiltersRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, listReceiptFiltersRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the ListReceiptRuleSets operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.ListReceiptRuleSets
* @see AWS API
* Documentation
*/
@Override
public ListReceiptRuleSetsResponse listReceiptRuleSets(ListReceiptRuleSetsRequest listReceiptRuleSetsRequest)
throws AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListReceiptRuleSetsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListReceiptRuleSets");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListReceiptRuleSets").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listReceiptRuleSetsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListReceiptRuleSetsRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, listReceiptRuleSetsRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the ListTemplates operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.ListTemplates
* @see AWS API
* Documentation
*/
@Override
public ListTemplatesResponse listTemplates(ListTemplatesRequest listTemplatesRequest) throws AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListTemplatesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTemplates");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListTemplates").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listTemplatesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListTemplatesRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, listTemplatesRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deprecated. Use the ListIdentities
operation to list the email addresses and domains associated with
* your account.
*
*
* @param listVerifiedEmailAddressesRequest
* @return Result of the ListVerifiedEmailAddresses operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.ListVerifiedEmailAddresses
* @see AWS API Documentation
*/
@Override
public ListVerifiedEmailAddressesResponse listVerifiedEmailAddresses(
ListVerifiedEmailAddressesRequest listVerifiedEmailAddressesRequest) throws AwsServiceException, SdkClientException,
SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ListVerifiedEmailAddressesResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListVerifiedEmailAddresses");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListVerifiedEmailAddresses").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(listVerifiedEmailAddressesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListVerifiedEmailAddressesRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
listVerifiedEmailAddressesRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Adds or updates the delivery options for a configuration set.
*
*
* @param putConfigurationSetDeliveryOptionsRequest
* A request to modify the delivery options for a configuration set.
* @return Result of the PutConfigurationSetDeliveryOptions operation returned by the service.
* @throws ConfigurationSetDoesNotExistException
* Indicates that the configuration set does not exist.
* @throws InvalidDeliveryOptionsException
* Indicates that provided delivery option is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.PutConfigurationSetDeliveryOptions
* @see AWS API Documentation
*/
@Override
public PutConfigurationSetDeliveryOptionsResponse putConfigurationSetDeliveryOptions(
PutConfigurationSetDeliveryOptionsRequest putConfigurationSetDeliveryOptionsRequest)
throws ConfigurationSetDoesNotExistException, InvalidDeliveryOptionsException, AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(PutConfigurationSetDeliveryOptionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutConfigurationSetDeliveryOptions");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("PutConfigurationSetDeliveryOptions").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(putConfigurationSetDeliveryOptionsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new PutConfigurationSetDeliveryOptionsRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
putConfigurationSetDeliveryOptionsRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the PutIdentityPolicy operation returned by the service.
* @throws InvalidPolicyException
* Indicates that the provided policy is invalid. Check the error stack for more information about what
* caused the error.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.PutIdentityPolicy
* @see AWS API
* Documentation
*/
@Override
public PutIdentityPolicyResponse putIdentityPolicy(PutIdentityPolicyRequest putIdentityPolicyRequest)
throws InvalidPolicyException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(PutIdentityPolicyResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutIdentityPolicy");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("PutIdentityPolicy").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(putIdentityPolicyRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new PutIdentityPolicyRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, putIdentityPolicyRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the ReorderReceiptRuleSet operation returned by the service.
* @throws RuleSetDoesNotExistException
* Indicates that the provided receipt rule set does not exist.
* @throws RuleDoesNotExistException
* Indicates that the provided receipt rule does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.ReorderReceiptRuleSet
* @see AWS
* API Documentation
*/
@Override
public ReorderReceiptRuleSetResponse reorderReceiptRuleSet(ReorderReceiptRuleSetRequest reorderReceiptRuleSetRequest)
throws RuleSetDoesNotExistException, RuleDoesNotExistException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(ReorderReceiptRuleSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ReorderReceiptRuleSet");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ReorderReceiptRuleSet").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(reorderReceiptRuleSetRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ReorderReceiptRuleSetRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, reorderReceiptRuleSetRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the SendBounce operation returned by the service.
* @throws 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.SendBounce
* @see AWS API
* Documentation
*/
@Override
public SendBounceResponse sendBounce(SendBounceRequest sendBounceRequest) throws MessageRejectedException,
AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SendBounceResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SendBounce");
return clientHandler
.execute(new ClientExecutionParams().withOperationName("SendBounce")
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(sendBounceRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new SendBounceRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, sendBounceRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the SendBulkTemplatedEmail operation returned by the service.
* @throws 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.
* @throws 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.
* @throws ConfigurationSetDoesNotExistException
* Indicates that the configuration set does not exist.
* @throws TemplateDoesNotExistException
* Indicates that the Template object you specified does not exist in your Amazon SES account.
* @throws ConfigurationSetSendingPausedException
* Indicates that email sending is disabled for the configuration set.
*
* You can enable or disable email sending for a configuration set using
* UpdateConfigurationSetSendingEnabled.
* @throws 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.SendBulkTemplatedEmail
* @see AWS
* API Documentation
*/
@Override
public SendBulkTemplatedEmailResponse sendBulkTemplatedEmail(SendBulkTemplatedEmailRequest sendBulkTemplatedEmailRequest)
throws MessageRejectedException, MailFromDomainNotVerifiedException, ConfigurationSetDoesNotExistException,
TemplateDoesNotExistException, ConfigurationSetSendingPausedException, AccountSendingPausedException,
AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SendBulkTemplatedEmailResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SendBulkTemplatedEmail");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("SendBulkTemplatedEmail").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(sendBulkTemplatedEmailRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new SendBulkTemplatedEmailRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, sendBulkTemplatedEmailRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the SendCustomVerificationEmail operation returned by the service.
* @throws 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.
* @throws ConfigurationSetDoesNotExistException
* Indicates that the configuration set does not exist.
* @throws CustomVerificationEmailTemplateDoesNotExistException
* Indicates that a custom verification email template with the name you specified does not exist.
* @throws 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.
* @throws ProductionAccessNotGrantedException
* Indicates that the account has not been granted production access.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.SendCustomVerificationEmail
* @see AWS API Documentation
*/
@Override
public SendCustomVerificationEmailResponse sendCustomVerificationEmail(
SendCustomVerificationEmailRequest sendCustomVerificationEmailRequest) throws MessageRejectedException,
ConfigurationSetDoesNotExistException, CustomVerificationEmailTemplateDoesNotExistException,
FromEmailAddressNotVerifiedException, ProductionAccessNotGrantedException, AwsServiceException, SdkClientException,
SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SendCustomVerificationEmailResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SendCustomVerificationEmail");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("SendCustomVerificationEmail").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(sendCustomVerificationEmailRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new SendCustomVerificationEmailRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
sendCustomVerificationEmailRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 Result of the SendEmail operation returned by the service.
* @throws 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.
* @throws 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.
* @throws ConfigurationSetDoesNotExistException
* Indicates that the configuration set does not exist.
* @throws ConfigurationSetSendingPausedException
* Indicates that email sending is disabled for the configuration set.
*
* You can enable or disable email sending for a configuration set using
* UpdateConfigurationSetSendingEnabled.
* @throws 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.SendEmail
* @see AWS API
* Documentation
*/
@Override
public SendEmailResponse sendEmail(SendEmailRequest sendEmailRequest) throws MessageRejectedException,
MailFromDomainNotVerifiedException, ConfigurationSetDoesNotExistException, ConfigurationSetSendingPausedException,
AccountSendingPausedException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SendEmailResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SendEmail");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("SendEmail").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(sendEmailRequest)
.withMetricCollector(apiCallMetricCollector).withMarshaller(new SendEmailRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, sendEmailRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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:
*
*
* -
*
* X-SES-SOURCE-ARN
*
*
* -
*
* X-SES-FROM-ARN
*
*
* -
*
* X-SES-RETURN-PATH-ARN
*
*
*
*
*
* Don't include these X-headers in the DKIM signature. Amazon SES removes these before it sends the email.
*
*
*
* If you only specify the SourceIdentityArn
parameter, Amazon SES sets the From and Return-Path
* addresses to the same identity that you specified.
*
*
* For more information about sending authorization, see the Using Sending
* Authorization with Amazon SES in the Amazon SES Developer Guide.
*
*
* -
*
* 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 sendRawEmailRequest
* Represents a request to send a single raw email using Amazon SES. For more information, see the Amazon SES Developer
* Guide.
* @return Result of the SendRawEmail operation returned by the service.
* @throws 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.
* @throws 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.
* @throws ConfigurationSetDoesNotExistException
* Indicates that the configuration set does not exist.
* @throws ConfigurationSetSendingPausedException
* Indicates that email sending is disabled for the configuration set.
*
* You can enable or disable email sending for a configuration set using
* UpdateConfigurationSetSendingEnabled.
* @throws 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.SendRawEmail
* @see AWS API
* Documentation
*/
@Override
public SendRawEmailResponse sendRawEmail(SendRawEmailRequest sendRawEmailRequest) throws MessageRejectedException,
MailFromDomainNotVerifiedException, ConfigurationSetDoesNotExistException, ConfigurationSetSendingPausedException,
AccountSendingPausedException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SendRawEmailResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SendRawEmail");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("SendRawEmail").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(sendRawEmailRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new SendRawEmailRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, sendRawEmailRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Composes an email message using an email template and immediately queues it for sending.
*
*
* In order to send email using the SendTemplatedEmail
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.
*
*
* -
*
* Calls to the SendTemplatedEmail
operation may only include one Destination
parameter. A
* destination is a set of recipients who will receive the same version of the email. The Destination
* parameter can include up to 50 recipients, across the To:, CC: and BCC: fields.
*
*
* -
*
* The 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.
*
*
*
*
*
* If your call to the SendTemplatedEmail
operation includes all of the required parameters, Amazon SES
* accepts it and returns a Message ID. However, if Amazon SES can't render the email because the template contains
* errors, it doesn't send the email. Additionally, because it already accepted the message, Amazon SES doesn't
* return a message stating that it was unable to send the email.
*
*
* For these reasons, we highly recommend that you set up Amazon SES to send you notifications when Rendering
* Failure events occur. For more information, see Sending
* Personalized Email Using the Amazon SES API in the Amazon Simple Email Service Developer Guide.
*
*
*
* @param sendTemplatedEmailRequest
* Represents a request to send a templated email using Amazon SES. For more information, see the Amazon SES
* Developer Guide.
* @return Result of the SendTemplatedEmail operation returned by the service.
* @throws 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.
* @throws 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.
* @throws ConfigurationSetDoesNotExistException
* Indicates that the configuration set does not exist.
* @throws TemplateDoesNotExistException
* Indicates that the Template object you specified does not exist in your Amazon SES account.
* @throws ConfigurationSetSendingPausedException
* Indicates that email sending is disabled for the configuration set.
*
* You can enable or disable email sending for a configuration set using
* UpdateConfigurationSetSendingEnabled.
* @throws 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.SendTemplatedEmail
* @see AWS API
* Documentation
*/
@Override
public SendTemplatedEmailResponse sendTemplatedEmail(SendTemplatedEmailRequest sendTemplatedEmailRequest)
throws MessageRejectedException, MailFromDomainNotVerifiedException, ConfigurationSetDoesNotExistException,
TemplateDoesNotExistException, ConfigurationSetSendingPausedException, AccountSendingPausedException,
AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SendTemplatedEmailResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SendTemplatedEmail");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("SendTemplatedEmail").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(sendTemplatedEmailRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new SendTemplatedEmailRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, sendTemplatedEmailRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Sets the specified receipt rule set as the active receipt rule set.
*
*
*
* To disable your email-receiving through Amazon SES completely, you can call this API with RuleSetName set to
* null.
*
*
*
* 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 setActiveReceiptRuleSetRequest
* Represents a request to set a receipt rule set as the active receipt rule set. You use receipt rule sets
* to receive email with Amazon SES. For more information, see the Amazon SES
* Developer Guide.
* @return Result of the SetActiveReceiptRuleSet operation returned by the service.
* @throws RuleSetDoesNotExistException
* Indicates that the provided receipt rule set does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.SetActiveReceiptRuleSet
* @see AWS
* API Documentation
*/
@Override
public SetActiveReceiptRuleSetResponse setActiveReceiptRuleSet(SetActiveReceiptRuleSetRequest setActiveReceiptRuleSetRequest)
throws RuleSetDoesNotExistException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SetActiveReceiptRuleSetResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SetActiveReceiptRuleSet");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("SetActiveReceiptRuleSet").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(setActiveReceiptRuleSetRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new SetActiveReceiptRuleSetRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, setActiveReceiptRuleSetRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Enables or disables Easy DKIM signing of email sent from an identity. If Easy DKIM signing is enabled for a
* domain, then Amazon SES uses DKIM to sign all email that it sends from addresses on that domain. If Easy DKIM
* signing is enabled for an email address, then Amazon SES uses DKIM to sign all email it sends from that address.
*
*
*
* For email addresses (for example, [email protected]
), you can only enable DKIM signing if the
* corresponding domain (in this case, example.com
) has been set up to use Easy DKIM.
*
*
*
* You can enable DKIM signing for an identity at any time after you start the verification process for the
* identity, even if the verification process isn't complete.
*
*
* You can execute this operation no more than once per second.
*
*
* For more information about Easy DKIM signing, go to the Amazon SES Developer Guide.
*
*
* @param setIdentityDkimEnabledRequest
* Represents a request to enable or disable Amazon SES Easy DKIM signing for an identity. For more
* information about setting up Easy DKIM, see the Amazon SES Developer
* Guide.
* @return Result of the SetIdentityDkimEnabled operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.SetIdentityDkimEnabled
* @see AWS
* API Documentation
*/
@Override
public SetIdentityDkimEnabledResponse setIdentityDkimEnabled(SetIdentityDkimEnabledRequest setIdentityDkimEnabledRequest)
throws AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SetIdentityDkimEnabledResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SetIdentityDkimEnabled");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("SetIdentityDkimEnabled").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(setIdentityDkimEnabledRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new SetIdentityDkimEnabledRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, setIdentityDkimEnabledRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Given an identity (an email address or a domain), enables or disables whether Amazon SES forwards bounce and
* complaint notifications as email. Feedback forwarding can only be disabled when Amazon Simple Notification
* Service (Amazon SNS) topics are specified for both bounces and complaints.
*
*
*
* Feedback forwarding does not apply to delivery notifications. Delivery notifications are only available through
* Amazon SNS.
*
*
*
* You can execute this operation no more than once per second.
*
*
* For more information about using notifications with Amazon SES, see the Amazon SES Developer Guide.
*
*
* @param setIdentityFeedbackForwardingEnabledRequest
* Represents a request to enable or disable whether Amazon SES forwards you bounce and complaint
* notifications through email. For information about email feedback forwarding, see the Amazon SES
* Developer Guide.
* @return Result of the SetIdentityFeedbackForwardingEnabled operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.SetIdentityFeedbackForwardingEnabled
* @see AWS API Documentation
*/
@Override
public SetIdentityFeedbackForwardingEnabledResponse setIdentityFeedbackForwardingEnabled(
SetIdentityFeedbackForwardingEnabledRequest setIdentityFeedbackForwardingEnabledRequest) throws AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SetIdentityFeedbackForwardingEnabledResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SetIdentityFeedbackForwardingEnabled");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("SetIdentityFeedbackForwardingEnabled").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler)
.withInput(setIdentityFeedbackForwardingEnabledRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new SetIdentityFeedbackForwardingEnabledRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
setIdentityFeedbackForwardingEnabledRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Given an identity (an email address or a domain), sets whether Amazon SES includes the original email headers in
* the Amazon Simple Notification Service (Amazon SNS) notifications of a specified type.
*
*
* You can execute this operation no more than once per second.
*
*
* For more information about using notifications with Amazon SES, see the Amazon SES Developer Guide.
*
*
* @param setIdentityHeadersInNotificationsEnabledRequest
* Represents a request to set whether Amazon SES includes the original email headers in the Amazon SNS
* notifications of a specified type. For information about notifications, see the Amazon SES
* Developer Guide.
* @return Result of the SetIdentityHeadersInNotificationsEnabled operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.SetIdentityHeadersInNotificationsEnabled
* @see AWS API Documentation
*/
@Override
public SetIdentityHeadersInNotificationsEnabledResponse setIdentityHeadersInNotificationsEnabled(
SetIdentityHeadersInNotificationsEnabledRequest setIdentityHeadersInNotificationsEnabledRequest)
throws AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SetIdentityHeadersInNotificationsEnabledResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SetIdentityHeadersInNotificationsEnabled");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("SetIdentityHeadersInNotificationsEnabled").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler)
.withInput(setIdentityHeadersInNotificationsEnabledRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new SetIdentityHeadersInNotificationsEnabledRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
setIdentityHeadersInNotificationsEnabledRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Enables or disables the custom MAIL FROM domain setup for a verified identity (an email address or a domain).
*
*
*
* To send emails using the specified MAIL FROM domain, you must add an MX record to your MAIL FROM domain's DNS
* settings. If you want your emails to pass Sender Policy Framework (SPF) checks, you must also add or update an
* SPF record. For more information, see the Amazon SES Developer Guide.
*
*
*
* You can execute this operation no more than once per second.
*
*
* @param setIdentityMailFromDomainRequest
* Represents a request to enable or disable the Amazon SES custom MAIL FROM domain setup for a verified
* identity. For information about using a custom MAIL FROM domain, see the Amazon SES Developer
* Guide.
* @return Result of the SetIdentityMailFromDomain operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.SetIdentityMailFromDomain
* @see AWS API Documentation
*/
@Override
public SetIdentityMailFromDomainResponse setIdentityMailFromDomain(
SetIdentityMailFromDomainRequest setIdentityMailFromDomainRequest) throws AwsServiceException, SdkClientException,
SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SetIdentityMailFromDomainResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SetIdentityMailFromDomain");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("SetIdentityMailFromDomain").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(setIdentityMailFromDomainRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new SetIdentityMailFromDomainRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
setIdentityMailFromDomainRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Sets an Amazon Simple Notification Service (Amazon SNS) topic to use when delivering notifications. When you use
* this operation, you specify a verified identity, such as an email address or domain. When you send an email that
* uses the chosen identity in the Source field, Amazon SES sends notifications to the topic you specified. You can
* send bounce, complaint, or delivery notifications (or any combination of the three) to the Amazon SNS topic that
* you specify.
*
*
* You can execute this operation no more than once per second.
*
*
* For more information about feedback notification, see the Amazon SES Developer Guide.
*
*
* @param setIdentityNotificationTopicRequest
* Represents a request to specify the Amazon SNS topic to which Amazon SES will publish bounce, complaint,
* or delivery notifications for emails sent with that identity as the Source. For information about Amazon
* SES notifications, see the Amazon SES
* Developer Guide.
* @return Result of the SetIdentityNotificationTopic operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.SetIdentityNotificationTopic
* @see AWS API Documentation
*/
@Override
public SetIdentityNotificationTopicResponse setIdentityNotificationTopic(
SetIdentityNotificationTopicRequest setIdentityNotificationTopicRequest) throws AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SetIdentityNotificationTopicResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SetIdentityNotificationTopic");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("SetIdentityNotificationTopic").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(setIdentityNotificationTopicRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new SetIdentityNotificationTopicRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
setIdentityNotificationTopicRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Sets the position of the specified receipt rule in the receipt rule set.
*
*
* For information about managing receipt rules, see the Amazon
* SES Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param setReceiptRulePositionRequest
* Represents a request to set the position of a receipt rule in 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 Result of the SetReceiptRulePosition operation returned by the service.
* @throws RuleSetDoesNotExistException
* Indicates that the provided receipt rule set does not exist.
* @throws RuleDoesNotExistException
* Indicates that the provided receipt rule does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.SetReceiptRulePosition
* @see AWS
* API Documentation
*/
@Override
public SetReceiptRulePositionResponse setReceiptRulePosition(SetReceiptRulePositionRequest setReceiptRulePositionRequest)
throws RuleSetDoesNotExistException, RuleDoesNotExistException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(SetReceiptRulePositionResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "SetReceiptRulePosition");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("SetReceiptRulePosition").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(setReceiptRulePositionRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new SetReceiptRulePositionRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, setReceiptRulePositionRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a preview of the MIME content of an email when provided with a template and a set of replacement data.
*
*
* You can execute this operation no more than once per second.
*
*
* @param testRenderTemplateRequest
* @return Result of the TestRenderTemplate operation returned by the service.
* @throws TemplateDoesNotExistException
* Indicates that the Template object you specified does not exist in your Amazon SES account.
* @throws InvalidRenderingParameterException
* Indicates that one or more of the replacement values you provided is invalid. This error may occur when
* the TemplateData object contains invalid JSON.
* @throws MissingRenderingAttributeException
* Indicates that one or more of the replacement values for the specified template was not specified. Ensure
* that the TemplateData object contains references to all of the replacement tags in the specified
* template.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.TestRenderTemplate
* @see AWS API
* Documentation
*/
@Override
public TestRenderTemplateResponse testRenderTemplate(TestRenderTemplateRequest testRenderTemplateRequest)
throws TemplateDoesNotExistException, InvalidRenderingParameterException, MissingRenderingAttributeException,
AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(TestRenderTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TestRenderTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("TestRenderTemplate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(testRenderTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new TestRenderTemplateRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, testRenderTemplateRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Enables or disables email sending across your entire Amazon SES account in the current AWS Region. You can use
* this operation in conjunction with Amazon CloudWatch alarms to temporarily pause email sending across your Amazon
* SES account in a given AWS Region when reputation metrics (such as your bounce or complaint rates) reach certain
* thresholds.
*
*
* You can execute this operation no more than once per second.
*
*
* @param updateAccountSendingEnabledRequest
* Represents a request to enable or disable the email sending capabilities for your entire Amazon SES
* account.
* @return Result of the UpdateAccountSendingEnabled operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.UpdateAccountSendingEnabled
* @see AWS API Documentation
*/
@Override
public UpdateAccountSendingEnabledResponse updateAccountSendingEnabled(
UpdateAccountSendingEnabledRequest updateAccountSendingEnabledRequest) throws AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateAccountSendingEnabledResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateAccountSendingEnabled");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateAccountSendingEnabled").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(updateAccountSendingEnabledRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UpdateAccountSendingEnabledRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
updateAccountSendingEnabledRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Updates the event destination of a configuration set. Event destinations are associated with configuration sets,
* which enable you to publish email sending events to Amazon CloudWatch, Amazon Kinesis Firehose, or Amazon Simple
* Notification Service (Amazon SNS). For information about using configuration sets, see Monitoring Your Amazon
* SES Sending Activity in the Amazon SES Developer Guide.
*
*
*
* When you create or update an event destination, you must provide one, and only one, destination. The destination
* can be Amazon CloudWatch, Amazon Kinesis Firehose, or Amazon Simple Notification Service (Amazon SNS).
*
*
*
* You can execute this operation no more than once per second.
*
*
* @param updateConfigurationSetEventDestinationRequest
* Represents a request to update the event destination 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 Result of the UpdateConfigurationSetEventDestination operation returned by the service.
* @throws ConfigurationSetDoesNotExistException
* Indicates that the configuration set does not exist.
* @throws EventDestinationDoesNotExistException
* Indicates that the event destination does not exist.
* @throws InvalidCloudWatchDestinationException
* Indicates that the Amazon CloudWatch destination is invalid. See the error message for details.
* @throws InvalidFirehoseDestinationException
* Indicates that the Amazon Kinesis Firehose destination is invalid. See the error message for details.
* @throws InvalidSnsDestinationException
* Indicates that the Amazon Simple Notification Service (Amazon SNS) destination is invalid. See the error
* message for details.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.UpdateConfigurationSetEventDestination
* @see AWS API Documentation
*/
@Override
public UpdateConfigurationSetEventDestinationResponse updateConfigurationSetEventDestination(
UpdateConfigurationSetEventDestinationRequest updateConfigurationSetEventDestinationRequest)
throws ConfigurationSetDoesNotExistException, EventDestinationDoesNotExistException,
InvalidCloudWatchDestinationException, InvalidFirehoseDestinationException, InvalidSnsDestinationException,
AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateConfigurationSetEventDestinationResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateConfigurationSetEventDestination");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateConfigurationSetEventDestination").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler)
.withInput(updateConfigurationSetEventDestinationRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UpdateConfigurationSetEventDestinationRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
updateConfigurationSetEventDestinationRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Enables or disables the publishing of reputation metrics for emails sent using a specific configuration set in a
* given AWS Region. Reputation metrics include bounce and complaint rates. These metrics are published to Amazon
* CloudWatch. By using CloudWatch, you can create alarms when bounce or complaint rates exceed certain thresholds.
*
*
* You can execute this operation no more than once per second.
*
*
* @param updateConfigurationSetReputationMetricsEnabledRequest
* Represents a request to modify the reputation metric publishing settings for a configuration set.
* @return Result of the UpdateConfigurationSetReputationMetricsEnabled operation returned by the service.
* @throws ConfigurationSetDoesNotExistException
* Indicates that the configuration set does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.UpdateConfigurationSetReputationMetricsEnabled
* @see AWS API Documentation
*/
@Override
public UpdateConfigurationSetReputationMetricsEnabledResponse updateConfigurationSetReputationMetricsEnabled(
UpdateConfigurationSetReputationMetricsEnabledRequest updateConfigurationSetReputationMetricsEnabledRequest)
throws ConfigurationSetDoesNotExistException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateConfigurationSetReputationMetricsEnabledResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateConfigurationSetReputationMetricsEnabled");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateConfigurationSetReputationMetricsEnabled")
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(updateConfigurationSetReputationMetricsEnabledRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UpdateConfigurationSetReputationMetricsEnabledRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
updateConfigurationSetReputationMetricsEnabledRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Enables or disables email sending for messages sent using a specific configuration set in a given AWS Region. You
* can use this operation in conjunction with Amazon CloudWatch alarms to temporarily pause email sending for a
* configuration set when the reputation metrics for that configuration set (such as your bounce on complaint rate)
* exceed certain thresholds.
*
*
* You can execute this operation no more than once per second.
*
*
* @param updateConfigurationSetSendingEnabledRequest
* Represents a request to enable or disable the email sending capabilities for a specific configuration set.
* @return Result of the UpdateConfigurationSetSendingEnabled operation returned by the service.
* @throws ConfigurationSetDoesNotExistException
* Indicates that the configuration set does not exist.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.UpdateConfigurationSetSendingEnabled
* @see AWS API Documentation
*/
@Override
public UpdateConfigurationSetSendingEnabledResponse updateConfigurationSetSendingEnabled(
UpdateConfigurationSetSendingEnabledRequest updateConfigurationSetSendingEnabledRequest)
throws ConfigurationSetDoesNotExistException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateConfigurationSetSendingEnabledResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateConfigurationSetSendingEnabled");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateConfigurationSetSendingEnabled").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler)
.withInput(updateConfigurationSetSendingEnabledRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UpdateConfigurationSetSendingEnabledRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
updateConfigurationSetSendingEnabledRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Modifies 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 updateConfigurationSetTrackingOptionsRequest
* Represents a request to update the tracking options for a configuration set.
* @return Result of the UpdateConfigurationSetTrackingOptions operation returned by the service.
* @throws ConfigurationSetDoesNotExistException
* Indicates that the configuration set does not exist.
* @throws TrackingOptionsDoesNotExistException
* Indicates that the TrackingOptions object you specified does not exist.
* @throws 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.
*
*
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.UpdateConfigurationSetTrackingOptions
* @see AWS API Documentation
*/
@Override
public UpdateConfigurationSetTrackingOptionsResponse updateConfigurationSetTrackingOptions(
UpdateConfigurationSetTrackingOptionsRequest updateConfigurationSetTrackingOptionsRequest)
throws ConfigurationSetDoesNotExistException, TrackingOptionsDoesNotExistException, InvalidTrackingOptionsException,
AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateConfigurationSetTrackingOptionsResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateConfigurationSetTrackingOptions");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateConfigurationSetTrackingOptions").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler)
.withInput(updateConfigurationSetTrackingOptionsRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UpdateConfigurationSetTrackingOptionsRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
updateConfigurationSetTrackingOptionsRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Updates 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 updateCustomVerificationEmailTemplateRequest
* Represents a request to update an existing custom verification email template.
* @return Result of the UpdateCustomVerificationEmailTemplate operation returned by the service.
* @throws CustomVerificationEmailTemplateDoesNotExistException
* Indicates that a custom verification email template with the name you specified does not exist.
* @throws 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.
* @throws CustomVerificationEmailInvalidContentException
* Indicates that custom verification email template provided content is invalid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.UpdateCustomVerificationEmailTemplate
* @see AWS API Documentation
*/
@Override
public UpdateCustomVerificationEmailTemplateResponse updateCustomVerificationEmailTemplate(
UpdateCustomVerificationEmailTemplateRequest updateCustomVerificationEmailTemplateRequest)
throws CustomVerificationEmailTemplateDoesNotExistException, FromEmailAddressNotVerifiedException,
CustomVerificationEmailInvalidContentException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateCustomVerificationEmailTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateCustomVerificationEmailTemplate");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("UpdateCustomVerificationEmailTemplate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler)
.withInput(updateCustomVerificationEmailTemplateRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UpdateCustomVerificationEmailTemplateRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration,
updateCustomVerificationEmailTemplateRequest.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Updates a 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 updateReceiptRuleRequest
* Represents a request to update a receipt rule. You use receipt rules to receive email with Amazon SES. For
* more information, see the Amazon SES
* Developer Guide.
* @return Result of the UpdateReceiptRule operation returned by the service.
* @throws 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.
* @throws 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.
* @throws 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.
* @throws RuleSetDoesNotExistException
* Indicates that the provided receipt rule set does not exist.
* @throws RuleDoesNotExistException
* Indicates that the provided receipt rule does not exist.
* @throws 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.UpdateReceiptRule
* @see AWS API
* Documentation
*/
@Override
public UpdateReceiptRuleResponse updateReceiptRule(UpdateReceiptRuleRequest updateReceiptRuleRequest)
throws InvalidSnsTopicException, InvalidS3ConfigurationException, InvalidLambdaFunctionException,
RuleSetDoesNotExistException, RuleDoesNotExistException, LimitExceededException, AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateReceiptRuleResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateReceiptRule");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("UpdateReceiptRule").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(updateReceiptRuleRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UpdateReceiptRuleRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, updateReceiptRuleRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Updates 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 updateTemplateRequest
* @return Result of the UpdateTemplate operation returned by the service.
* @throws TemplateDoesNotExistException
* Indicates that the Template object you specified does not exist in your Amazon SES account.
* @throws 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.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.UpdateTemplate
* @see AWS API
* Documentation
*/
@Override
public UpdateTemplateResponse updateTemplate(UpdateTemplateRequest updateTemplateRequest)
throws TemplateDoesNotExistException, InvalidTemplateException, AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(UpdateTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateTemplate");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("UpdateTemplate").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(updateTemplateRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new UpdateTemplateRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, updateTemplateRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Returns a set of DKIM tokens for a domain identity.
*
*
*
* When you execute the VerifyDomainDkim
operation, the domain that you specify is added to the list of
* identities that are associated with your account. This is true even if you haven't already associated the domain
* with your account by using the VerifyDomainIdentity
operation. However, you can't send email from
* the domain until you either successfully verify it or you
* successfully set up DKIM for
* it.
*
*
*
* You use the tokens that are generated by this operation to create CNAME records. When Amazon SES detects that
* you've added these records to the DNS configuration for a domain, you can start sending email from that domain.
* You can start sending email even if you haven't added the TXT record provided by the VerifyDomainIdentity
* operation to the DNS configuration for your domain. All email that you send from the domain is authenticated
* using DKIM.
*
*
* To create the CNAME records for DKIM authentication, use the following values:
*
*
* -
*
* Name: token._domainkey.example.com
*
*
* -
*
* Type: CNAME
*
*
* -
*
* Value: token.dkim.amazonses.com
*
*
*
*
* In the preceding example, replace token with one of the tokens that are generated when you execute this
* operation. Replace example.com with your domain. Repeat this process for each token that's generated by
* this operation.
*
*
* You can execute this operation no more than once per second.
*
*
* @param verifyDomainDkimRequest
* Represents a request to generate the CNAME records needed to set up Easy DKIM with Amazon SES. For more
* information about setting up Easy DKIM, see the Amazon SES Developer
* Guide.
* @return Result of the VerifyDomainDkim operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.VerifyDomainDkim
* @see AWS API
* Documentation
*/
@Override
public VerifyDomainDkimResponse verifyDomainDkim(VerifyDomainDkimRequest verifyDomainDkimRequest) throws AwsServiceException,
SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(VerifyDomainDkimResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "VerifyDomainDkim");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("VerifyDomainDkim").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(verifyDomainDkimRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new VerifyDomainDkimRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, verifyDomainDkimRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Adds a domain to the list of identities for your Amazon SES account in the current AWS Region and attempts to
* verify it. For more information about verifying domains, see Verifying Email
* Addresses and Domains in the Amazon SES Developer Guide.
*
*
* You can execute this operation no more than once per second.
*
*
* @param verifyDomainIdentityRequest
* Represents a request to begin Amazon SES domain verification and to generate the TXT records that you must
* publish to the DNS server of your domain to complete the verification. For information about domain
* verification, see the Amazon SES Developer
* Guide.
* @return Result of the VerifyDomainIdentity operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.VerifyDomainIdentity
* @see AWS API
* Documentation
*/
@Override
public VerifyDomainIdentityResponse verifyDomainIdentity(VerifyDomainIdentityRequest verifyDomainIdentityRequest)
throws AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(VerifyDomainIdentityResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "VerifyDomainIdentity");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("VerifyDomainIdentity").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(verifyDomainIdentityRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new VerifyDomainIdentityRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, verifyDomainIdentityRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deprecated. Use the VerifyEmailIdentity
operation to verify a new email address.
*
*
* @param verifyEmailAddressRequest
* Represents a request to begin email address verification with Amazon SES. For information about email
* address verification, see the Amazon SES
* Developer Guide.
* @return Result of the VerifyEmailAddress operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.VerifyEmailAddress
* @see AWS API
* Documentation
*/
@Override
public VerifyEmailAddressResponse verifyEmailAddress(VerifyEmailAddressRequest verifyEmailAddressRequest)
throws AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(VerifyEmailAddressResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "VerifyEmailAddress");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("VerifyEmailAddress").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(verifyEmailAddressRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new VerifyEmailAddressRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, verifyEmailAddressRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* 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 verification email is sent to the specified
* address.
*
*
* You can execute this operation no more than once per second.
*
*
* @param verifyEmailIdentityRequest
* Represents a request to begin email address verification with Amazon SES. For information about email
* address verification, see the Amazon SES
* Developer Guide.
* @return Result of the VerifyEmailIdentity operation returned by the service.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SesClient.VerifyEmailIdentity
* @see AWS API
* Documentation
*/
@Override
public VerifyEmailIdentityResponse verifyEmailIdentity(VerifyEmailIdentityRequest verifyEmailIdentityRequest)
throws AwsServiceException, SdkClientException, SesException {
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(VerifyEmailIdentityResponse::builder);
HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler();
MetricCollector apiCallMetricCollector = MetricCollector.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "SES");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "VerifyEmailIdentity");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("VerifyEmailIdentity").withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withInput(verifyEmailIdentityRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new VerifyEmailIdentityRequestMarshaller(protocolFactory)));
} finally {
List metricPublishers = resolveMetricPublishers(clientConfiguration, verifyEmailIdentityRequest
.overrideConfiguration().orElse(null));
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
private static List resolveMetricPublishers(SdkClientConfiguration clientConfiguration,
RequestOverrideConfiguration requestOverrideConfiguration) {
List publishers = null;
if (requestOverrideConfiguration != null) {
publishers = requestOverrideConfiguration.metricPublishers();
}
if (publishers == null || publishers.isEmpty()) {
publishers = clientConfiguration.option(SdkClientOption.METRIC_PUBLISHERS);
}
if (publishers == null) {
publishers = Collections.emptyList();
}
return publishers;
}
private AwsQueryProtocolFactory init() {
return AwsQueryProtocolFactory
.builder()
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidFirehoseDestination")
.exceptionBuilderSupplier(InvalidFirehoseDestinationException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidS3Configuration")
.exceptionBuilderSupplier(InvalidS3ConfigurationException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidDeliveryOptions")
.exceptionBuilderSupplier(InvalidDeliveryOptionsException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidRenderingParameter")
.exceptionBuilderSupplier(InvalidRenderingParameterException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidSNSDestination")
.exceptionBuilderSupplier(InvalidSnsDestinationException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("MessageRejected")
.exceptionBuilderSupplier(MessageRejectedException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidCloudWatchDestination")
.exceptionBuilderSupplier(InvalidCloudWatchDestinationException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("AccountSendingPausedException")
.exceptionBuilderSupplier(AccountSendingPausedException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("RuleSetDoesNotExist")
.exceptionBuilderSupplier(RuleSetDoesNotExistException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidSnsTopic")
.exceptionBuilderSupplier(InvalidSnsTopicException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("LimitExceeded")
.exceptionBuilderSupplier(LimitExceededException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ConfigurationSetSendingPausedException")
.exceptionBuilderSupplier(ConfigurationSetSendingPausedException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("EventDestinationDoesNotExist")
.exceptionBuilderSupplier(EventDestinationDoesNotExistException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidLambdaFunction")
.exceptionBuilderSupplier(InvalidLambdaFunctionException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("TemplateDoesNotExist")
.exceptionBuilderSupplier(TemplateDoesNotExistException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("MissingRenderingAttribute")
.exceptionBuilderSupplier(MissingRenderingAttributeException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("AlreadyExists")
.exceptionBuilderSupplier(AlreadyExistsException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("CannotDelete")
.exceptionBuilderSupplier(CannotDeleteException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("TrackingOptionsAlreadyExistsException")
.exceptionBuilderSupplier(TrackingOptionsAlreadyExistsException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ConfigurationSetAlreadyExists")
.exceptionBuilderSupplier(ConfigurationSetAlreadyExistsException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("CustomVerificationEmailInvalidContent")
.exceptionBuilderSupplier(CustomVerificationEmailInvalidContentException::builder)
.httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidTemplate")
.exceptionBuilderSupplier(InvalidTemplateException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("MailFromDomainNotVerifiedException")
.exceptionBuilderSupplier(MailFromDomainNotVerifiedException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ConfigurationSetDoesNotExist")
.exceptionBuilderSupplier(ConfigurationSetDoesNotExistException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("ProductionAccessNotGranted")
.exceptionBuilderSupplier(ProductionAccessNotGrantedException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidTrackingOptions")
.exceptionBuilderSupplier(InvalidTrackingOptionsException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("TrackingOptionsDoesNotExistException")
.exceptionBuilderSupplier(TrackingOptionsDoesNotExistException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("EventDestinationAlreadyExists")
.exceptionBuilderSupplier(EventDestinationAlreadyExistsException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("FromEmailAddressNotVerified")
.exceptionBuilderSupplier(FromEmailAddressNotVerifiedException::builder).httpStatusCode(400)
.build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("RuleDoesNotExist")
.exceptionBuilderSupplier(RuleDoesNotExistException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidConfigurationSet")
.exceptionBuilderSupplier(InvalidConfigurationSetException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("CustomVerificationEmailTemplateDoesNotExist")
.exceptionBuilderSupplier(CustomVerificationEmailTemplateDoesNotExistException::builder)
.httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("InvalidPolicy")
.exceptionBuilderSupplier(InvalidPolicyException::builder).httpStatusCode(400).build())
.registerModeledException(
ExceptionMetadata.builder().errorCode("CustomVerificationEmailTemplateAlreadyExists")
.exceptionBuilderSupplier(CustomVerificationEmailTemplateAlreadyExistsException::builder)
.httpStatusCode(400).build()).clientConfiguration(clientConfiguration)
.defaultServiceExceptionSupplier(SesException::builder).build();
}
@Override
public void close() {
clientHandler.close();
}
private T applyPaginatorUserAgent(T request) {
Consumer userAgentApplier = b -> b.addApiName(ApiName.builder()
.version(VersionInfo.SDK_VERSION).name("PAGINATED").build());
AwsRequestOverrideConfiguration overrideConfiguration = request.overrideConfiguration()
.map(c -> c.toBuilder().applyMutation(userAgentApplier).build())
.orElse((AwsRequestOverrideConfiguration.builder().applyMutation(userAgentApplier).build()));
return (T) request.toBuilder().overrideConfiguration(overrideConfiguration).build();
}
}