Struct aws_sdk_ses::Client

source ·
pub struct Client { /* private fields */ }
Expand description

Client for Amazon Simple Email Service

Client for invoking operations on Amazon Simple Email Service. Each operation on Amazon Simple Email Service is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

§Constructing a Client

A Config is required to construct a client. For most use cases, the aws-config crate should be used to automatically resolve this config using aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared across multiple different AWS SDK clients. This config resolution process can be customized by calling aws_config::from_env() instead, which returns a ConfigLoader that uses the builder pattern to customize the default config.

In the simplest case, creating a client looks as follows:

let config = aws_config::load_from_env().await;
let client = aws_sdk_ses::Client::new(&config);

Occasionally, SDKs may have additional service-specific values that can be set on the Config that is absent from SdkConfig, or slightly different settings for a specific client may be desired. The Config struct implements From<&SdkConfig>, so setting these specific settings can be done as follows:

let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_ses::config::Builder::from(&sdk_config)
    .some_service_specific_setting("value")
    .build();

See the aws-config docs and Config for more information on customizing configuration.

Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.

§Using the Client

A client has a function for every operation that can be performed by the service. For example, the CloneReceiptRuleSet operation has a Client::clone_receipt_rule_set, function which returns a builder for that operation. The fluent builder ultimately has a send() function that returns an async future that returns a result, as illustrated below:

let result = client.clone_receipt_rule_set()
    .rule_set_name("example")
    .send()
    .await;

The underlying HTTP requests that get made by this can be modified with the customize_operation function on the fluent builder. See the customize module for more information.

§Waiters

This client provides wait_until methods behind the Waiters trait. To use them, simply import the trait, and then call one of the wait_until methods. This will return a waiter fluent builder that takes various parameters, which are documented on the builder type. Once parameters have been provided, the wait method can be called to initiate waiting.

For example, if there was a wait_until_thing method, it could look like:

let result = client.wait_until_thing()
    .thing_id("someId")
    .wait(Duration::from_secs(120))
    .await;

Implementations§

source§

impl Client

source

pub fn clone_receipt_rule_set(&self) -> CloneReceiptRuleSetFluentBuilder

Constructs a fluent builder for the CloneReceiptRuleSet operation.

source§

impl Client

source

pub fn create_configuration_set(&self) -> CreateConfigurationSetFluentBuilder

Constructs a fluent builder for the CreateConfigurationSet operation.

source§

impl Client

source

pub fn create_configuration_set_event_destination( &self ) -> CreateConfigurationSetEventDestinationFluentBuilder

Constructs a fluent builder for the CreateConfigurationSetEventDestination operation.

source§

impl Client

source

pub fn create_configuration_set_tracking_options( &self ) -> CreateConfigurationSetTrackingOptionsFluentBuilder

Constructs a fluent builder for the CreateConfigurationSetTrackingOptions operation.

source§

impl Client

source

pub fn create_custom_verification_email_template( &self ) -> CreateCustomVerificationEmailTemplateFluentBuilder

Constructs a fluent builder for the CreateCustomVerificationEmailTemplate operation.

source§

impl Client

source

pub fn create_receipt_filter(&self) -> CreateReceiptFilterFluentBuilder

Constructs a fluent builder for the CreateReceiptFilter operation.

source§

impl Client

source

pub fn create_receipt_rule(&self) -> CreateReceiptRuleFluentBuilder

Constructs a fluent builder for the CreateReceiptRule operation.

source§

impl Client

source

pub fn create_receipt_rule_set(&self) -> CreateReceiptRuleSetFluentBuilder

Constructs a fluent builder for the CreateReceiptRuleSet operation.

source§

impl Client

source

pub fn create_template(&self) -> CreateTemplateFluentBuilder

Constructs a fluent builder for the CreateTemplate operation.

source§

impl Client

source

pub fn delete_configuration_set(&self) -> DeleteConfigurationSetFluentBuilder

Constructs a fluent builder for the DeleteConfigurationSet operation.

source§

impl Client

source

pub fn delete_configuration_set_event_destination( &self ) -> DeleteConfigurationSetEventDestinationFluentBuilder

Constructs a fluent builder for the DeleteConfigurationSetEventDestination operation.

source§

impl Client

source

pub fn delete_configuration_set_tracking_options( &self ) -> DeleteConfigurationSetTrackingOptionsFluentBuilder

Constructs a fluent builder for the DeleteConfigurationSetTrackingOptions operation.

source§

impl Client

source

pub fn delete_custom_verification_email_template( &self ) -> DeleteCustomVerificationEmailTemplateFluentBuilder

Constructs a fluent builder for the DeleteCustomVerificationEmailTemplate operation.

source§

impl Client

source

pub fn delete_identity(&self) -> DeleteIdentityFluentBuilder

Constructs a fluent builder for the DeleteIdentity operation.

source§

impl Client

source

pub fn delete_identity_policy(&self) -> DeleteIdentityPolicyFluentBuilder

Constructs a fluent builder for the DeleteIdentityPolicy operation.

source§

impl Client

source

pub fn delete_receipt_filter(&self) -> DeleteReceiptFilterFluentBuilder

Constructs a fluent builder for the DeleteReceiptFilter operation.

source§

impl Client

source

pub fn delete_receipt_rule(&self) -> DeleteReceiptRuleFluentBuilder

Constructs a fluent builder for the DeleteReceiptRule operation.

source§

impl Client

source

pub fn delete_receipt_rule_set(&self) -> DeleteReceiptRuleSetFluentBuilder

Constructs a fluent builder for the DeleteReceiptRuleSet operation.

source§

impl Client

source

pub fn delete_template(&self) -> DeleteTemplateFluentBuilder

Constructs a fluent builder for the DeleteTemplate operation.

source§

impl Client

source

pub fn delete_verified_email_address( &self ) -> DeleteVerifiedEmailAddressFluentBuilder

Constructs a fluent builder for the DeleteVerifiedEmailAddress operation.

source§

impl Client

source

pub fn describe_active_receipt_rule_set( &self ) -> DescribeActiveReceiptRuleSetFluentBuilder

Constructs a fluent builder for the DescribeActiveReceiptRuleSet operation.

source§

impl Client

source

pub fn describe_configuration_set( &self ) -> DescribeConfigurationSetFluentBuilder

Constructs a fluent builder for the DescribeConfigurationSet operation.

source§

impl Client

source

pub fn describe_receipt_rule(&self) -> DescribeReceiptRuleFluentBuilder

Constructs a fluent builder for the DescribeReceiptRule operation.

source§

impl Client

source

pub fn describe_receipt_rule_set(&self) -> DescribeReceiptRuleSetFluentBuilder

Constructs a fluent builder for the DescribeReceiptRuleSet operation.

source§

impl Client

source

pub fn get_account_sending_enabled( &self ) -> GetAccountSendingEnabledFluentBuilder

Constructs a fluent builder for the GetAccountSendingEnabled operation.

source§

impl Client

source

pub fn get_custom_verification_email_template( &self ) -> GetCustomVerificationEmailTemplateFluentBuilder

Constructs a fluent builder for the GetCustomVerificationEmailTemplate operation.

source§

impl Client

source

pub fn get_identity_dkim_attributes( &self ) -> GetIdentityDkimAttributesFluentBuilder

Constructs a fluent builder for the GetIdentityDkimAttributes operation.

source§

impl Client

source

pub fn get_identity_mail_from_domain_attributes( &self ) -> GetIdentityMailFromDomainAttributesFluentBuilder

Constructs a fluent builder for the GetIdentityMailFromDomainAttributes operation.

source§

impl Client

source

pub fn get_identity_notification_attributes( &self ) -> GetIdentityNotificationAttributesFluentBuilder

Constructs a fluent builder for the GetIdentityNotificationAttributes operation.

source§

impl Client

source

pub fn get_identity_policies(&self) -> GetIdentityPoliciesFluentBuilder

Constructs a fluent builder for the GetIdentityPolicies operation.

source§

impl Client

source

pub fn get_identity_verification_attributes( &self ) -> GetIdentityVerificationAttributesFluentBuilder

Constructs a fluent builder for the GetIdentityVerificationAttributes operation.

source§

impl Client

source

pub fn get_send_quota(&self) -> GetSendQuotaFluentBuilder

Constructs a fluent builder for the GetSendQuota operation.

  • The fluent builder takes no input, just send it.
  • On success, responds with GetSendQuotaOutput with field(s):
    • max24_hour_send(f64):

      The maximum number of emails the user is allowed to send in a 24-hour interval. A value of -1 signifies an unlimited quota.

    • max_send_rate(f64):

      The maximum number of emails that Amazon SES can accept from the user’s account per second.

      The rate at which Amazon SES accepts the user’s messages might be less than the maximum send rate.

    • sent_last24_hours(f64):

      The number of emails sent during the previous 24 hours.

  • On failure, responds with SdkError<GetSendQuotaError>
source§

impl Client

source

pub fn get_send_statistics(&self) -> GetSendStatisticsFluentBuilder

Constructs a fluent builder for the GetSendStatistics operation.

source§

impl Client

source

pub fn get_template(&self) -> GetTemplateFluentBuilder

Constructs a fluent builder for the GetTemplate operation.

source§

impl Client

source

pub fn list_configuration_sets(&self) -> ListConfigurationSetsFluentBuilder

Constructs a fluent builder for the ListConfigurationSets operation.

source§

impl Client

source

pub fn list_custom_verification_email_templates( &self ) -> ListCustomVerificationEmailTemplatesFluentBuilder

Constructs a fluent builder for the ListCustomVerificationEmailTemplates operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_identities(&self) -> ListIdentitiesFluentBuilder

Constructs a fluent builder for the ListIdentities operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_identity_policies(&self) -> ListIdentityPoliciesFluentBuilder

Constructs a fluent builder for the ListIdentityPolicies operation.

source§

impl Client

source

pub fn list_receipt_filters(&self) -> ListReceiptFiltersFluentBuilder

Constructs a fluent builder for the ListReceiptFilters operation.

source§

impl Client

source

pub fn list_receipt_rule_sets(&self) -> ListReceiptRuleSetsFluentBuilder

Constructs a fluent builder for the ListReceiptRuleSets operation.

source§

impl Client

source

pub fn list_templates(&self) -> ListTemplatesFluentBuilder

Constructs a fluent builder for the ListTemplates operation.

source§

impl Client

source

pub fn list_verified_email_addresses( &self ) -> ListVerifiedEmailAddressesFluentBuilder

Constructs a fluent builder for the ListVerifiedEmailAddresses operation.

source§

impl Client

source

pub fn put_configuration_set_delivery_options( &self ) -> PutConfigurationSetDeliveryOptionsFluentBuilder

Constructs a fluent builder for the PutConfigurationSetDeliveryOptions operation.

source§

impl Client

source

pub fn put_identity_policy(&self) -> PutIdentityPolicyFluentBuilder

Constructs a fluent builder for the PutIdentityPolicy operation.

source§

impl Client

source

pub fn reorder_receipt_rule_set(&self) -> ReorderReceiptRuleSetFluentBuilder

Constructs a fluent builder for the ReorderReceiptRuleSet operation.

source§

impl Client

source

pub fn send_bounce(&self) -> SendBounceFluentBuilder

Constructs a fluent builder for the SendBounce operation.

source§

impl Client

source

pub fn send_bulk_templated_email(&self) -> SendBulkTemplatedEmailFluentBuilder

Constructs a fluent builder for the SendBulkTemplatedEmail operation.

  • The fluent builder is configurable:
    • source(impl Into<String>) / set_source(Option<String>):
      required: true

      The email address that is sending the email. This email address must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES. For information about verifying identities, see the Amazon SES Developer Guide.

      If you are sending on behalf of another user and have been permitted to do so by a sending authorization policy, then you must also specify the SourceArn parameter. For more information about sending authorization, see the Amazon SES Developer Guide.

      Amazon SES does not support the SMTPUTF8 extension, as described in RFC6531. For this reason, the email address string must be 7-bit ASCII. If you want to send to or from email addresses that contain Unicode characters in the domain part of an address, you must encode the domain using Punycode. Punycode is not permitted in the local part of the email address (the part before the @ sign) nor in the “friendly from” name. If you want to use Unicode characters in the “friendly from” name, you must encode the “friendly from” name using MIME encoded-word syntax, as described in Sending raw email using the Amazon SES API. For more information about Punycode, see RFC 3492.


    • source_arn(impl Into<String>) / set_source_arn(Option<String>):
      required: false

      This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to send for the email address specified in the Source parameter.

      For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to send from user@example.com, then you would specify the SourceArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the Source to be user@example.com.

      For more information about sending authorization, see the Amazon SES Developer Guide.


    • reply_to_addresses(impl Into<String>) / set_reply_to_addresses(Option<Vec::<String>>):
      required: false

      The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address receives the reply.


    • return_path(impl Into<String>) / set_return_path(Option<String>):
      required: false

      The email address that bounces and complaints are forwarded to when feedback forwarding is enabled. If the message cannot be delivered to the recipient, then an error message is returned from the recipient’s ISP; this message is forwarded to the email address specified by the ReturnPath parameter. The ReturnPath parameter is never overwritten. This email address must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES.


    • return_path_arn(impl Into<String>) / set_return_path_arn(Option<String>):
      required: false

      This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the ReturnPath parameter.

      For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use feedback@example.com, then you would specify the ReturnPathArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the ReturnPath to be feedback@example.com.

      For more information about sending authorization, see the Amazon SES Developer Guide.


    • configuration_set_name(impl Into<String>) / set_configuration_set_name(Option<String>):
      required: false

      The name of the configuration set to use when you send an email using SendBulkTemplatedEmail.


    • default_tags(MessageTag) / set_default_tags(Option<Vec::<MessageTag>>):
      required: false

      A list of tags, in the form of name/value pairs, to apply to an email that you send to a destination using SendBulkTemplatedEmail.


    • template(impl Into<String>) / set_template(Option<String>):
      required: true

      The template to use when sending this email.


    • template_arn(impl Into<String>) / set_template_arn(Option<String>):
      required: false

      The ARN of the template to use when sending this email.


    • default_template_data(impl Into<String>) / set_default_template_data(Option<String>):
      required: false

      A list of replacement values to apply to the template when replacement data is not specified in a Destination object. These values act as a default or fallback option when no other data is available.

      The template data is a JSON object, typically consisting of key-value pairs in which the keys correspond to replacement tags in the email template.


    • destinations(BulkEmailDestination) / set_destinations(Option<Vec::<BulkEmailDestination>>):
      required: true

      One or more Destination objects. All of the recipients in a Destination receive the same version of the email. You can specify up to 50 Destination objects within a Destinations array.


  • On success, responds with SendBulkTemplatedEmailOutput with field(s):
    • status(Vec::<BulkEmailDestinationStatus>):

      One object per intended recipient. Check each response object and retry any messages with a failure status. (Note that order of responses will be respective to order of destinations in the request.)Receipt rules enable you to specify which actions

  • On failure, responds with SdkError<SendBulkTemplatedEmailError>
source§

impl Client

source

pub fn send_custom_verification_email( &self ) -> SendCustomVerificationEmailFluentBuilder

Constructs a fluent builder for the SendCustomVerificationEmail operation.

source§

impl Client

source

pub fn send_email(&self) -> SendEmailFluentBuilder

Constructs a fluent builder for the SendEmail operation.

  • The fluent builder is configurable:
    • source(impl Into<String>) / set_source(Option<String>):
      required: true

      The email address that is sending the email. This email address must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES. For information about verifying identities, see the Amazon SES Developer Guide.

      If you are sending on behalf of another user and have been permitted to do so by a sending authorization policy, then you must also specify the SourceArn parameter. For more information about sending authorization, see the Amazon SES Developer Guide.

      Amazon SES does not support the SMTPUTF8 extension, as described in RFC6531. For this reason, the email address string must be 7-bit ASCII. If you want to send to or from email addresses that contain Unicode characters in the domain part of an address, you must encode the domain using Punycode. Punycode is not permitted in the local part of the email address (the part before the @ sign) nor in the “friendly from” name. If you want to use Unicode characters in the “friendly from” name, you must encode the “friendly from” name using MIME encoded-word syntax, as described in Sending raw email using the Amazon SES API. For more information about Punycode, see RFC 3492.


    • destination(Destination) / set_destination(Option<Destination>):
      required: true

      The destination for this email, composed of To:, CC:, and BCC: fields.


    • message(Message) / set_message(Option<Message>):
      required: true

      The message to be sent.


    • reply_to_addresses(impl Into<String>) / set_reply_to_addresses(Option<Vec::<String>>):
      required: false

      The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address receives the reply.


    • return_path(impl Into<String>) / set_return_path(Option<String>):
      required: false

      The email address that bounces and complaints are forwarded to when feedback forwarding is enabled. If the message cannot be delivered to the recipient, then an error message is returned from the recipient’s ISP; this message is forwarded to the email address specified by the ReturnPath parameter. The ReturnPath parameter is never overwritten. This email address must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES.


    • source_arn(impl Into<String>) / set_source_arn(Option<String>):
      required: false

      This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to send for the email address specified in the Source parameter.

      For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to send from user@example.com, then you would specify the SourceArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the Source to be user@example.com.

      For more information about sending authorization, see the Amazon SES Developer Guide.


    • return_path_arn(impl Into<String>) / set_return_path_arn(Option<String>):
      required: false

      This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the ReturnPath parameter.

      For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use feedback@example.com, then you would specify the ReturnPathArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the ReturnPath to be feedback@example.com.

      For more information about sending authorization, see the Amazon SES Developer Guide.


    • tags(MessageTag) / set_tags(Option<Vec::<MessageTag>>):
      required: false

      A list of tags, in the form of name/value pairs, to apply to an email that you send using SendEmail. Tags correspond to characteristics of the email that you define, so that you can publish email sending events.


    • configuration_set_name(impl Into<String>) / set_configuration_set_name(Option<String>):
      required: false

      The name of the configuration set to use when you send an email using SendEmail.


  • On success, responds with SendEmailOutput with field(s):
  • On failure, responds with SdkError<SendEmailError>
source§

impl Client

source

pub fn send_raw_email(&self) -> SendRawEmailFluentBuilder

Constructs a fluent builder for the SendRawEmail operation.

  • The fluent builder is configurable:
    • source(impl Into<String>) / set_source(Option<String>):
      required: false

      The identity’s email address. If you do not provide a value for this parameter, you must specify a “From” address in the raw text of the message. (You can also specify both.)

      Amazon SES does not support the SMTPUTF8 extension, as described inRFC6531. For this reason, the email address string must be 7-bit ASCII. If you want to send to or from email addresses that contain Unicode characters in the domain part of an address, you must encode the domain using Punycode. Punycode is not permitted in the local part of the email address (the part before the @ sign) nor in the “friendly from” name. If you want to use Unicode characters in the “friendly from” name, you must encode the “friendly from” name using MIME encoded-word syntax, as described in Sending raw email using the Amazon SES API. For more information about Punycode, see RFC 3492.

      If you specify the Source parameter and have feedback forwarding enabled, then bounces and complaints are sent to this email address. This takes precedence over any Return-Path header that you might include in the raw text of the message.


    • destinations(impl Into<String>) / set_destinations(Option<Vec::<String>>):
      required: false

      A list of destinations for the message, consisting of To:, CC:, and BCC: addresses.


    • raw_message(RawMessage) / set_raw_message(Option<RawMessage>):
      required: true

      The raw email message itself. The message has to meet the following criteria:

      • The message has to contain a header and a body, separated by a blank line.

      • All of the required header fields must be present in the message.

      • Each part of a multipart MIME message must be formatted properly.

      • Attachments must be of a content type that Amazon SES supports. For a list on unsupported content types, see Unsupported Attachment Types in the Amazon SES Developer Guide.

      • The entire message must be base64-encoded.

      • If any of the MIME parts in your message contain content that is outside of the 7-bit ASCII character range, we highly recommend that you encode that content. For more information, see Sending Raw Email in the Amazon SES Developer Guide.

      • Per RFC 5321, the maximum length of each line of text, including the , must not exceed 1,000 characters.


    • from_arn(impl Into<String>) / set_from_arn(Option<String>):
      required: false

      This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to specify a particular “From” address in the header of the raw email.

      Instead of using this parameter, you can use the X-header X-SES-FROM-ARN in the raw message of the email. If you use both the FromArn parameter and the corresponding X-header, Amazon SES uses the value of the FromArn parameter.

      For information about when to use this parameter, see the description of SendRawEmail in this guide, or see the Amazon SES Developer Guide.


    • source_arn(impl Into<String>) / set_source_arn(Option<String>):
      required: false

      This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to send for the email address specified in the Source parameter.

      For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to send from user@example.com, then you would specify the SourceArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the Source to be user@example.com.

      Instead of using this parameter, you can use the X-header X-SES-SOURCE-ARN in the raw message of the email. If you use both the SourceArn parameter and the corresponding X-header, Amazon SES uses the value of the SourceArn parameter.

      For information about when to use this parameter, see the description of SendRawEmail in this guide, or see the Amazon SES Developer Guide.


    • return_path_arn(impl Into<String>) / set_return_path_arn(Option<String>):
      required: false

      This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the ReturnPath parameter.

      For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use feedback@example.com, then you would specify the ReturnPathArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the ReturnPath to be feedback@example.com.

      Instead of using this parameter, you can use the X-header X-SES-RETURN-PATH-ARN in the raw message of the email. If you use both the ReturnPathArn parameter and the corresponding X-header, Amazon SES uses the value of the ReturnPathArn parameter.

      For information about when to use this parameter, see the description of SendRawEmail in this guide, or see the Amazon SES Developer Guide.


    • tags(MessageTag) / set_tags(Option<Vec::<MessageTag>>):
      required: false

      A list of tags, in the form of name/value pairs, to apply to an email that you send using SendRawEmail. Tags correspond to characteristics of the email that you define, so that you can publish email sending events.


    • configuration_set_name(impl Into<String>) / set_configuration_set_name(Option<String>):
      required: false

      The name of the configuration set to use when you send an email using SendRawEmail.


  • On success, responds with SendRawEmailOutput with field(s):
    • message_id(String):

      The unique message identifier returned from the SendRawEmail action.

  • On failure, responds with SdkError<SendRawEmailError>
source§

impl Client

source

pub fn send_templated_email(&self) -> SendTemplatedEmailFluentBuilder

Constructs a fluent builder for the SendTemplatedEmail operation.

  • The fluent builder is configurable:
    • source(impl Into<String>) / set_source(Option<String>):
      required: true

      The email address that is sending the email. This email address must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES. For information about verifying identities, see the Amazon SES Developer Guide.

      If you are sending on behalf of another user and have been permitted to do so by a sending authorization policy, then you must also specify the SourceArn parameter. For more information about sending authorization, see the Amazon SES Developer Guide.

      Amazon SES does not support the SMTPUTF8 extension, as described in RFC6531. for this reason, The email address string must be 7-bit ASCII. If you want to send to or from email addresses that contain Unicode characters in the domain part of an address, you must encode the domain using Punycode. Punycode is not permitted in the local part of the email address (the part before the @ sign) nor in the “friendly from” name. If you want to use Unicode characters in the “friendly from” name, you must encode the “friendly from” name using MIME encoded-word syntax, as described in Sending raw email using the Amazon SES API. For more information about Punycode, see RFC 3492.


    • destination(Destination) / set_destination(Option<Destination>):
      required: true

      The destination for this email, composed of To:, CC:, and BCC: fields. A Destination can include up to 50 recipients across these three fields.


    • reply_to_addresses(impl Into<String>) / set_reply_to_addresses(Option<Vec::<String>>):
      required: false

      The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address receives the reply.


    • return_path(impl Into<String>) / set_return_path(Option<String>):
      required: false

      The email address that bounces and complaints are forwarded to when feedback forwarding is enabled. If the message cannot be delivered to the recipient, then an error message is returned from the recipient’s ISP; this message is forwarded to the email address specified by the ReturnPath parameter. The ReturnPath parameter is never overwritten. This email address must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES.


    • source_arn(impl Into<String>) / set_source_arn(Option<String>):
      required: false

      This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to send for the email address specified in the Source parameter.

      For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to send from user@example.com, then you would specify the SourceArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the Source to be user@example.com.

      For more information about sending authorization, see the Amazon SES Developer Guide.


    • return_path_arn(impl Into<String>) / set_return_path_arn(Option<String>):
      required: false

      This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the ReturnPath parameter.

      For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use feedback@example.com, then you would specify the ReturnPathArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the ReturnPath to be feedback@example.com.

      For more information about sending authorization, see the Amazon SES Developer Guide.


    • tags(MessageTag) / set_tags(Option<Vec::<MessageTag>>):
      required: false

      A list of tags, in the form of name/value pairs, to apply to an email that you send using SendTemplatedEmail. Tags correspond to characteristics of the email that you define, so that you can publish email sending events.


    • configuration_set_name(impl Into<String>) / set_configuration_set_name(Option<String>):
      required: false

      The name of the configuration set to use when you send an email using SendTemplatedEmail.


    • template(impl Into<String>) / set_template(Option<String>):
      required: true

      The template to use when sending this email.


    • template_arn(impl Into<String>) / set_template_arn(Option<String>):
      required: false

      The ARN of the template to use when sending this email.


    • template_data(impl Into<String>) / set_template_data(Option<String>):
      required: true

      A list of replacement values to apply to the template. This parameter is a JSON object, typically consisting of key-value pairs in which the keys correspond to replacement tags in the email template.


  • On success, responds with SendTemplatedEmailOutput with field(s):
    • message_id(String):

      The unique message identifier returned from the SendTemplatedEmail action.

  • On failure, responds with SdkError<SendTemplatedEmailError>
source§

impl Client

source

pub fn set_active_receipt_rule_set( &self ) -> SetActiveReceiptRuleSetFluentBuilder

Constructs a fluent builder for the SetActiveReceiptRuleSet operation.

source§

impl Client

source

pub fn set_identity_dkim_enabled(&self) -> SetIdentityDkimEnabledFluentBuilder

Constructs a fluent builder for the SetIdentityDkimEnabled operation.

source§

impl Client

source

pub fn set_identity_feedback_forwarding_enabled( &self ) -> SetIdentityFeedbackForwardingEnabledFluentBuilder

Constructs a fluent builder for the SetIdentityFeedbackForwardingEnabled operation.

source§

impl Client

source

pub fn set_identity_headers_in_notifications_enabled( &self ) -> SetIdentityHeadersInNotificationsEnabledFluentBuilder

Constructs a fluent builder for the SetIdentityHeadersInNotificationsEnabled operation.

source§

impl Client

source

pub fn set_identity_mail_from_domain( &self ) -> SetIdentityMailFromDomainFluentBuilder

Constructs a fluent builder for the SetIdentityMailFromDomain operation.

source§

impl Client

source

pub fn set_identity_notification_topic( &self ) -> SetIdentityNotificationTopicFluentBuilder

Constructs a fluent builder for the SetIdentityNotificationTopic operation.

source§

impl Client

source

pub fn set_receipt_rule_position(&self) -> SetReceiptRulePositionFluentBuilder

Constructs a fluent builder for the SetReceiptRulePosition operation.

source§

impl Client

source

pub fn test_render_template(&self) -> TestRenderTemplateFluentBuilder

Constructs a fluent builder for the TestRenderTemplate operation.

source§

impl Client

source

pub fn update_account_sending_enabled( &self ) -> UpdateAccountSendingEnabledFluentBuilder

Constructs a fluent builder for the UpdateAccountSendingEnabled operation.

source§

impl Client

source

pub fn update_configuration_set_event_destination( &self ) -> UpdateConfigurationSetEventDestinationFluentBuilder

Constructs a fluent builder for the UpdateConfigurationSetEventDestination operation.

source§

impl Client

source

pub fn update_configuration_set_reputation_metrics_enabled( &self ) -> UpdateConfigurationSetReputationMetricsEnabledFluentBuilder

Constructs a fluent builder for the UpdateConfigurationSetReputationMetricsEnabled operation.

source§

impl Client

source

pub fn update_configuration_set_sending_enabled( &self ) -> UpdateConfigurationSetSendingEnabledFluentBuilder

Constructs a fluent builder for the UpdateConfigurationSetSendingEnabled operation.

source§

impl Client

source

pub fn update_configuration_set_tracking_options( &self ) -> UpdateConfigurationSetTrackingOptionsFluentBuilder

Constructs a fluent builder for the UpdateConfigurationSetTrackingOptions operation.

source§

impl Client

source

pub fn update_custom_verification_email_template( &self ) -> UpdateCustomVerificationEmailTemplateFluentBuilder

Constructs a fluent builder for the UpdateCustomVerificationEmailTemplate operation.

source§

impl Client

source

pub fn update_receipt_rule(&self) -> UpdateReceiptRuleFluentBuilder

Constructs a fluent builder for the UpdateReceiptRule operation.

source§

impl Client

source

pub fn update_template(&self) -> UpdateTemplateFluentBuilder

Constructs a fluent builder for the UpdateTemplate operation.

source§

impl Client

source

pub fn verify_domain_dkim(&self) -> VerifyDomainDkimFluentBuilder

Constructs a fluent builder for the VerifyDomainDkim operation.

  • The fluent builder is configurable:
  • On success, responds with VerifyDomainDkimOutput with field(s):
    • dkim_tokens(Vec::<String>):

      A set of character strings that represent the domain’s identity. If the identity is an email address, the tokens represent the domain of that address.

      Using these tokens, you need to create DNS CNAME records that point to DKIM public keys that are hosted by Amazon SES. Amazon Web Services eventually detects that you’ve updated your DNS records. This detection process might take up to 72 hours. After successful detection, Amazon SES is able to DKIM-sign email originating from that domain. (This only applies to domain identities, not email address identities.)

      For more information about creating DNS records using DKIM tokens, see the Amazon SES Developer Guide.

  • On failure, responds with SdkError<VerifyDomainDkimError>
source§

impl Client

source

pub fn verify_domain_identity(&self) -> VerifyDomainIdentityFluentBuilder

Constructs a fluent builder for the VerifyDomainIdentity operation.

  • The fluent builder is configurable:
  • On success, responds with VerifyDomainIdentityOutput with field(s):
    • verification_token(String):

      A TXT record that you must place in the DNS settings of the domain to complete domain verification with Amazon SES.

      As Amazon SES searches for the TXT record, the domain’s verification status is “Pending”. 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, to verify the domain, you must restart the verification process from the beginning. The domain’s verification status also changes to “Success” when it is DKIM verified.

  • On failure, responds with SdkError<VerifyDomainIdentityError>
source§

impl Client

source

pub fn verify_email_address(&self) -> VerifyEmailAddressFluentBuilder

Constructs a fluent builder for the VerifyEmailAddress operation.

source§

impl Client

source

pub fn verify_email_identity(&self) -> VerifyEmailIdentityFluentBuilder

Constructs a fluent builder for the VerifyEmailIdentity operation.

source§

impl Client

source

pub fn from_conf(conf: Config) -> Self

Creates a new client from the service Config.

§Panics

This method will panic in the following cases:

  • Retries or timeouts are enabled without a sleep_impl configured.
  • Identity caching is enabled without a sleep_impl and time_source configured.
  • No behavior_version is provided.

The panic message for each of these will have instructions on how to resolve them.

source

pub fn config(&self) -> &Config

Returns the client’s configuration.

source§

impl Client

source

pub fn new(sdk_config: &SdkConfig) -> Self

Creates a new client from an SDK Config.

§Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.
  • This method will panic if no BehaviorVersion is provided. If you experience this panic, set behavior_version on the Config or enable the behavior-version-latest Cargo feature.

Trait Implementations§

source§

impl Clone for Client

source§

fn clone(&self) -> Client

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Client

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Waiters for Client

Auto Trait Implementations§

§

impl Freeze for Client

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more