You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::SESV2::Client

Inherits:
Seahorse::Client::Base show all
Defined in:
(unknown)

Overview

An API client for Amazon Simple Email Service. To construct a client, you need to configure a :region and :credentials.

sesv2 = Aws::SESV2::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

See #initialize for a full list of supported configuration options.

Region

You can configure a default region in the following locations:

  • ENV['AWS_REGION']
  • Aws.config[:region]

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • Aws.config[:credentials]
  • The shared credentials ini file at ~/.aws/credentials (more information)
  • From an instance profile when running on EC2

You can also construct a credentials object from one of the following classes:

Alternatively, you configure credentials with :access_key_id and :secret_access_key:

# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))

Aws::SESV2::Client.new(
  access_key_id: creds['access_key_id'],
  secret_access_key: creds['secret_access_key']
)

Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

Constructor collapse

API Operations collapse

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Base

add_plugin, api, #build_request, clear_plugins, define, new, #operation, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options = {}) ⇒ Aws::SESV2::Client

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :active_endpoint_cache (Boolean)

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false. See Plugins::EndpointDiscovery for more details.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types. See Plugins::ParamConverter for more details.

  • :credentials (required, Credentials)

    Your AWS credentials. The following locations will be searched in order for credentials:

    • :access_key_id, :secret_access_key, and :session_token options
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • HOME/.aws/credentials shared credentials file
    • EC2 instance profile credentials See Plugins::RequestSigner for more details.
  • :disable_host_prefix_injection (Boolean)

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available. See Plugins::EndpointPattern for more details.

  • :endpoint (String)

    A default endpoint is constructed from the :region. See Plugins::RegionalEndpoint for more details.

  • :endpoint_cache_max_entries (Integer)

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_max_threads (Integer)

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_poll_interval (Integer)

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec. See Plugins::EndpointDiscovery for more details.

  • :endpoint_discovery (Boolean)

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false. See Plugins::EndpointDiscovery for more details.

  • :http_continue_timeout (Float) — default: 1

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_idle_timeout (Integer) — default: 5

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_open_timeout (Integer) — default: 15

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_proxy (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_read_timeout (Integer) — default: 60

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_wire_trace (Boolean) — default: false

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the logger at. See Plugins::Logging for more details.

  • :log_formatter (Logging::LogFormatter)

    The log formatter. Defaults to Seahorse::Client::Logging::Formatter.default. See Plugins::Logging for more details.

  • :logger (Logger) — default: nil

    The Logger instance to send log messages to. If this option is not set, logging will be disabled. See Plugins::Logging for more details.

  • :profile (String)

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used. See Plugins::RequestSigner for more details.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised. See Seahorse::Client::Plugins::RaiseResponseErrors for more details.

  • :region (required, String)

    The AWS region to connect to. The region is used to construct the client endpoint. Defaults to ENV['AWS_REGION']. Also checks AMAZON_REGION and AWS_DEFAULT_REGION. See Plugins::RegionalEndpoint for more details.

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials. See Plugins::RetryErrors for more details.

  • :secret_access_key (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :session_token (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :ssl_ca_bundle (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_directory (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_store (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_verify_peer (Boolean) — default: true

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled. See Plugins::StubResponses for more details.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request. See Plugins::ParamValidator for more details.

Instance Method Details

#create_configuration_set(options = {}) ⇒ Struct

Create a configuration set. Configuration sets are groups of rules that you can apply to the emails that you send. You apply a configuration set to an email by specifying the name of the configuration set when you call the Amazon SES API v2. When you apply a configuration set to an email, all of the rules in that configuration set are applied to the email.

Examples:

Request syntax with placeholder values


resp = client.create_configuration_set({
  configuration_set_name: "ConfigurationSetName", # required
  tracking_options: {
    custom_redirect_domain: "CustomRedirectDomain", # required
  },
  delivery_options: {
    tls_policy: "REQUIRE", # accepts REQUIRE, OPTIONAL
    sending_pool_name: "PoolName",
  },
  reputation_options: {
    reputation_metrics_enabled: false,
    last_fresh_start: Time.now,
  },
  sending_options: {
    sending_enabled: false,
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  suppression_options: {
    suppressed_reasons: ["BOUNCE"], # accepts BOUNCE, COMPLAINT
  },
})

Options Hash (options):

  • :configuration_set_name (required, String)

    The name of the configuration set.

  • :tracking_options (Types::TrackingOptions)

    An object that defines the open and click tracking options for emails that you send using the configuration set.

  • :delivery_options (Types::DeliveryOptions)

    An object that defines the dedicated IP pool that is used to send emails that you send using the configuration set.

  • :reputation_options (Types::ReputationOptions)

    An object that defines whether or not Amazon SES collects reputation metrics for the emails that you send that use the configuration set.

  • :sending_options (Types::SendingOptions)

    An object that defines whether or not Amazon SES can send email that you send using the configuration set.

  • :tags (Array<Types::Tag>)

    An array of objects that define the tags (keys and values) that you want to associate with the configuration set.

  • :suppression_options (Types::SuppressionOptions)

    An object that contains information about the suppression list preferences for your account.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#create_configuration_set_event_destination(options = {}) ⇒ Struct

Create an event destination. Events include message sends, deliveries, opens, clicks, bounces, and complaints. Event destinations are places that you can send information about these events to. For example, you can send event data to Amazon SNS to receive notifications when you receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

A single configuration set can include more than one event destination.

Examples:

Request syntax with placeholder values


resp = client.create_configuration_set_event_destination({
  configuration_set_name: "ConfigurationSetName", # required
  event_destination_name: "EventDestinationName", # required
  event_destination: { # required
    enabled: false,
    matching_event_types: ["SEND"], # accepts SEND, REJECT, BOUNCE, COMPLAINT, DELIVERY, OPEN, CLICK, RENDERING_FAILURE, DELIVERY_DELAY, SUBSCRIPTION
    kinesis_firehose_destination: {
      iam_role_arn: "AmazonResourceName", # required
      delivery_stream_arn: "AmazonResourceName", # required
    },
    cloud_watch_destination: {
      dimension_configurations: [ # required
        {
          dimension_name: "DimensionName", # required
          dimension_value_source: "MESSAGE_TAG", # required, accepts MESSAGE_TAG, EMAIL_HEADER, LINK_TAG
          default_dimension_value: "DefaultDimensionValue", # required
        },
      ],
    },
    sns_destination: {
      topic_arn: "AmazonResourceName", # required
    },
    pinpoint_destination: {
      application_arn: "AmazonResourceName",
    },
  },
})

Options Hash (options):

  • :configuration_set_name (required, String)

    The name of the configuration set that you want to add an event destination to.

  • :event_destination_name (required, String)

    A name that identifies the event destination within the configuration set.

  • :event_destination (required, Types::EventDestinationDefinition)

    An object that defines the event destination.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#create_contact(options = {}) ⇒ Struct

Creates a contact, which is an end-user who is receiving the email, and adds them to a contact list.

Examples:

Request syntax with placeholder values


resp = client.create_contact({
  contact_list_name: "ContactListName", # required
  email_address: "EmailAddress", # required
  topic_preferences: [
    {
      topic_name: "TopicName", # required
      subscription_status: "OPT_IN", # required, accepts OPT_IN, OPT_OUT
    },
  ],
  unsubscribe_all: false,
  attributes_data: "AttributesData",
})

Options Hash (options):

  • :contact_list_name (required, String)

    The name of the contact list to which the contact should be added.

  • :email_address (required, String)

    The contact\'s email address.

  • :topic_preferences (Array<Types::TopicPreference>)

    The contact\'s preferences for being opted-in to or opted-out of topics.

  • :unsubscribe_all (Boolean)

    A boolean value status noting if the contact is unsubscribed from all contact list topics.

  • :attributes_data (String)

    The attribute data attached to a contact.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#create_contact_list(options = {}) ⇒ Struct

Creates a contact list.

Examples:

Request syntax with placeholder values


resp = client.create_contact_list({
  contact_list_name: "ContactListName", # required
  topics: [
    {
      topic_name: "TopicName", # required
      display_name: "DisplayName", # required
      description: "Description",
      default_subscription_status: "OPT_IN", # required, accepts OPT_IN, OPT_OUT
    },
  ],
  description: "Description",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Options Hash (options):

  • :contact_list_name (required, String)

    The name of the contact list.

  • :topics (Array<Types::Topic>)

    An interest group, theme, or label within a list. A contact list can have multiple topics.

  • :description (String)

    A description of what the contact list is about.

  • :tags (Array<Types::Tag>)

    The tags associated with a contact list.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#create_custom_verification_email_template(options = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.create_custom_verification_email_template({
  template_name: "EmailTemplateName", # required
  from_email_address: "EmailAddress", # required
  template_subject: "EmailTemplateSubject", # required
  template_content: "TemplateContent", # required
  success_redirection_url: "SuccessRedirectionURL", # required
  failure_redirection_url: "FailureRedirectionURL", # required
})

Options Hash (options):

  • :template_name (required, String)

    The name of the custom verification email template.

  • :from_email_address (required, String)

    The email address that the custom verification email is sent from.

  • :template_subject (required, String)

    The subject line of the custom verification email.

  • :template_content (required, String)

    The content of the custom verification email. The total size of the email must be less than 10 MB. The message body may contain HTML, with some limitations. For more information, see Custom Verification Email Frequently Asked Questions in the Amazon SES Developer Guide.

  • :success_redirection_url (required, String)

    The URL that the recipient of the verification email is sent to if his or her address is successfully verified.

  • :failure_redirection_url (required, String)

    The URL that the recipient of the verification email is sent to if his or her address is not successfully verified.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#create_dedicated_ip_pool(options = {}) ⇒ Struct

Create a new pool of dedicated IP addresses. A pool can include one or more dedicated IP addresses that are associated with your AWS account. You can associate a pool with a configuration set. When you send an email that uses that configuration set, the message is sent from one of the addresses in the associated pool.

Examples:

Request syntax with placeholder values


resp = client.create_dedicated_ip_pool({
  pool_name: "PoolName", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Options Hash (options):

  • :pool_name (required, String)

    The name of the dedicated IP pool.

  • :tags (Array<Types::Tag>)

    An object that defines the tags (keys and values) that you want to associate with the pool.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#create_deliverability_test_report(options = {}) ⇒ Types::CreateDeliverabilityTestReportResponse

Create a new predictive inbox placement test. Predictive inbox placement tests can help you predict how your messages will be handled by various email providers around the world. When you perform a predictive inbox placement test, you provide a sample message that contains the content that you plan to send to your customers. Amazon SES then sends that message to special email addresses spread across several major email providers. After about 24 hours, the test is complete, and you can use the GetDeliverabilityTestReport operation to view the results of the test.

Examples:

Request syntax with placeholder values


resp = client.create_deliverability_test_report({
  report_name: "ReportName",
  from_email_address: "EmailAddress", # required
  content: { # required
    simple: {
      subject: { # required
        data: "MessageData", # required
        charset: "Charset",
      },
      body: { # required
        text: {
          data: "MessageData", # required
          charset: "Charset",
        },
        html: {
          data: "MessageData", # required
          charset: "Charset",
        },
      },
    },
    raw: {
      data: "data", # required
    },
    template: {
      template_name: "EmailTemplateName",
      template_arn: "AmazonResourceName",
      template_data: "EmailTemplateData",
    },
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.report_id #=> String
resp.deliverability_test_status #=> String, one of "IN_PROGRESS", "COMPLETED"

Options Hash (options):

  • :report_name (String)

    A unique name that helps you to identify the predictive inbox placement test when you retrieve the results.

  • :from_email_address (required, String)

    The email address that the predictive inbox placement test email was sent from.

  • :content (required, Types::EmailContent)

    The HTML body of the message that you sent when you performed the predictive inbox placement test.

  • :tags (Array<Types::Tag>)

    An array of objects that define the tags (keys and values) that you want to associate with the predictive inbox placement test.

Returns:

See Also:

#create_email_identity(options = {}) ⇒ Types::CreateEmailIdentityResponse

Starts the process of verifying an email identity. An identity is an email address or domain that you use when you send email. Before you can use an identity to send email, you first have to verify it. By verifying an identity, you demonstrate that you're the owner of the identity, and that you've given Amazon SES API v2 permission to send email from the identity.

When you verify an email address, Amazon SES sends an email to the address. Your email address is verified as soon as you follow the link in the verification email.

When you verify a domain without specifying the DkimSigningAttributes object, this operation provides a set of DKIM tokens. You can convert these tokens into CNAME records, which you then add to the DNS configuration for your domain. Your domain is verified when Amazon SES detects these records in the DNS configuration for your domain. This verification method is known as Easy DKIM.

Alternatively, you can perform the verification process by providing your own public-private key pair. This verification method is known as Bring Your Own DKIM (BYODKIM). To use BYODKIM, your call to the CreateEmailIdentity operation has to include the DkimSigningAttributes object. When you specify this object, you provide a selector (a component of the DNS record name that identifies the public key that you want to use for DKIM authentication) and a private key.

Examples:

Request syntax with placeholder values


resp = client.create_email_identity({
  email_identity: "Identity", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  dkim_signing_attributes: {
    domain_signing_selector: "Selector", # required
    domain_signing_private_key: "PrivateKey", # required
  },
})

Response structure


resp.identity_type #=> String, one of "EMAIL_ADDRESS", "DOMAIN", "MANAGED_DOMAIN"
resp.verified_for_sending_status #=> true/false
resp.dkim_attributes.signing_enabled #=> true/false
resp.dkim_attributes.status #=> String, one of "PENDING", "SUCCESS", "FAILED", "TEMPORARY_FAILURE", "NOT_STARTED"
resp.dkim_attributes.tokens #=> Array
resp.dkim_attributes.tokens[0] #=> String
resp.dkim_attributes.signing_attributes_origin #=> String, one of "AWS_SES", "EXTERNAL"

Options Hash (options):

  • :email_identity (required, String)

    The email address or domain that you want to verify.

  • :tags (Array<Types::Tag>)

    An array of objects that define the tags (keys and values) that you want to associate with the email identity.

  • :dkim_signing_attributes (Types::DkimSigningAttributes)

    If your request includes this object, Amazon SES configures the identity to use Bring Your Own DKIM (BYODKIM) for DKIM authentication purposes, as opposed to the default method, Easy DKIM.

    You can only specify this object if the email identity is a domain, as opposed to an address.

Returns:

See Also:

#create_email_identity_policy(options = {}) ⇒ Struct

Creates the specified sending authorization policy for the given 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.

Examples:

Request syntax with placeholder values


resp = client.create_email_identity_policy({
  email_identity: "Identity", # required
  policy_name: "PolicyName", # required
  policy: "Policy", # required
})

Options Hash (options):

  • :email_identity (required, String)

    The email identity for which you want to create a policy.

  • :policy_name (required, String)

    The name of the policy.

    The policy name cannot exceed 64 characters and can only include alphanumeric characters, dashes, and underscores.

  • :policy (required, String)

    The text of the policy in JSON format. The policy cannot exceed 4 KB.

    For information about the syntax of sending authorization policies, see the Amazon SES Developer Guide.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#create_email_template(options = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.create_email_template({
  template_name: "EmailTemplateName", # required
  template_content: { # required
    subject: "EmailTemplateSubject",
    text: "EmailTemplateText",
    html: "EmailTemplateHtml",
  },
})

Options Hash (options):

  • :template_name (required, String)

    The name of the template you want to create.

  • :template_content (required, Types::EmailTemplateContent)

    The content of the email template, composed of a subject line, an HTML part, and a text-only part.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#create_import_job(options = {}) ⇒ Types::CreateImportJobResponse

Creates an import job for a data destination.

Examples:

Request syntax with placeholder values


resp = client.create_import_job({
  import_destination: { # required
    suppression_list_destination: {
      suppression_list_import_action: "DELETE", # required, accepts DELETE, PUT
    },
    contact_list_destination: {
      contact_list_name: "ContactListName", # required
      contact_list_import_action: "DELETE", # required, accepts DELETE, PUT
    },
  },
  import_data_source: { # required
    s3_url: "S3Url", # required
    data_format: "CSV", # required, accepts CSV, JSON
  },
})

Response structure


resp.job_id #=> String

Options Hash (options):

Returns:

See Also:

#delete_configuration_set(options = {}) ⇒ Struct

Delete an existing configuration set.

Configuration sets are groups of rules that you can apply to the emails you send. You apply a configuration set to an email by including a reference to the configuration set in the headers of the email. When you apply a configuration set to an email, all of the rules in that configuration set are applied to the email.

Examples:

Request syntax with placeholder values


resp = client.delete_configuration_set({
  configuration_set_name: "ConfigurationSetName", # required
})

Options Hash (options):

  • :configuration_set_name (required, String)

    The name of the configuration set that you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_configuration_set_event_destination(options = {}) ⇒ Struct

Delete an event destination.

Events include message sends, deliveries, opens, clicks, bounces, and complaints. Event destinations are places that you can send information about these events to. For example, you can send event data to Amazon SNS to receive notifications when you receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

Examples:

Request syntax with placeholder values


resp = client.delete_configuration_set_event_destination({
  configuration_set_name: "ConfigurationSetName", # required
  event_destination_name: "EventDestinationName", # required
})

Options Hash (options):

  • :configuration_set_name (required, String)

    The name of the configuration set that contains the event destination that you want to delete.

  • :event_destination_name (required, String)

    The name of the event destination that you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_contact(options = {}) ⇒ Struct

Removes a contact from a contact list.

Examples:

Request syntax with placeholder values


resp = client.delete_contact({
  contact_list_name: "ContactListName", # required
  email_address: "EmailAddress", # required
})

Options Hash (options):

  • :contact_list_name (required, String)

    The name of the contact list from which the contact should be removed.

  • :email_address (required, String)

    The contact\'s email address.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_contact_list(options = {}) ⇒ Struct

Deletes a contact list and all of the contacts on that list.

Examples:

Request syntax with placeholder values


resp = client.delete_contact_list({
  contact_list_name: "ContactListName", # required
})

Options Hash (options):

  • :contact_list_name (required, String)

    The name of the contact list.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_custom_verification_email_template(options = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.delete_custom_verification_email_template({
  template_name: "EmailTemplateName", # required
})

Options Hash (options):

  • :template_name (required, String)

    The name of the custom verification email template that you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_dedicated_ip_pool(options = {}) ⇒ Struct

Delete a dedicated IP pool.

Examples:

Request syntax with placeholder values


resp = client.delete_dedicated_ip_pool({
  pool_name: "PoolName", # required
})

Options Hash (options):

  • :pool_name (required, String)

    The name of the dedicated IP pool that you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_email_identity(options = {}) ⇒ Struct

Deletes an email identity. An identity can be either an email address or a domain name.

Examples:

Request syntax with placeholder values


resp = client.delete_email_identity({
  email_identity: "Identity", # required
})

Options Hash (options):

  • :email_identity (required, String)

    The identity (that is, the email address or domain) that you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_email_identity_policy(options = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.delete_email_identity_policy({
  email_identity: "Identity", # required
  policy_name: "PolicyName", # required
})

Options Hash (options):

  • :email_identity (required, String)

    The email identity for which you want to delete a policy.

  • :policy_name (required, String)

    The name of the policy.

    The policy name cannot exceed 64 characters and can only include alphanumeric characters, dashes, and underscores.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_email_template(options = {}) ⇒ Struct

Deletes an email template.

You can execute this operation no more than once per second.

Examples:

Request syntax with placeholder values


resp = client.delete_email_template({
  template_name: "EmailTemplateName", # required
})

Options Hash (options):

  • :template_name (required, String)

    The name of the template to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_suppressed_destination(options = {}) ⇒ Struct

Removes an email address from the suppression list for your account.

Examples:

Request syntax with placeholder values


resp = client.delete_suppressed_destination({
  email_address: "EmailAddress", # required
})

Options Hash (options):

  • :email_address (required, String)

    The suppressed email destination to remove from the account suppression list.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#get_account(options = {}) ⇒ Types::GetAccountResponse

Obtain information about the email-sending status and capabilities of your Amazon SES account in the current AWS Region.

Examples:

Request syntax with placeholder values


resp = client.()

Response structure


resp.dedicated_ip_auto_warmup_enabled #=> true/false
resp.enforcement_status #=> String
resp.production_access_enabled #=> true/false
resp.send_quota.max_24_hour_send #=> Float
resp.send_quota.max_send_rate #=> Float
resp.send_quota.sent_last_24_hours #=> Float
resp.sending_enabled #=> true/false
resp.suppression_attributes.suppressed_reasons #=> Array
resp.suppression_attributes.suppressed_reasons[0] #=> String, one of "BOUNCE", "COMPLAINT"
resp.details.mail_type #=> String, one of "MARKETING", "TRANSACTIONAL"
resp.details.website_url #=> String
resp.details.contact_language #=> String, one of "EN", "JA"
resp.details.use_case_description #=> String
resp.details.additional_contact_email_addresses #=> Array
resp.details.additional_contact_email_addresses[0] #=> String
resp.details.review_details.status #=> String, one of "PENDING", "FAILED", "GRANTED", "DENIED"
resp.details.review_details.case_id #=> String

Returns:

See Also:

#get_blacklist_reports(options = {}) ⇒ Types::GetBlacklistReportsResponse

Retrieve a list of the blacklists that your dedicated IP addresses appear on.

Examples:

Request syntax with placeholder values


resp = client.get_blacklist_reports({
  blacklist_item_names: ["BlacklistItemName"], # required
})

Response structure


resp.blacklist_report #=> Hash
resp.blacklist_report["BlacklistItemName"] #=> Array
resp.blacklist_report["BlacklistItemName"][0].rbl_name #=> String
resp.blacklist_report["BlacklistItemName"][0].listing_time #=> Time
resp.blacklist_report["BlacklistItemName"][0].description #=> String

Options Hash (options):

  • :blacklist_item_names (required, Array<String>)

    A list of IP addresses that you want to retrieve blacklist information about. You can only specify the dedicated IP addresses that you use to send email using Amazon SES or Amazon Pinpoint.

Returns:

See Also:

#get_configuration_set(options = {}) ⇒ Types::GetConfigurationSetResponse

Get information about an existing configuration set, including the dedicated IP pool that it's associated with, whether or not it's enabled for sending email, and more.

Configuration sets are groups of rules that you can apply to the emails you send. You apply a configuration set to an email by including a reference to the configuration set in the headers of the email. When you apply a configuration set to an email, all of the rules in that configuration set are applied to the email.

Examples:

Request syntax with placeholder values


resp = client.get_configuration_set({
  configuration_set_name: "ConfigurationSetName", # required
})

Response structure


resp.configuration_set_name #=> String
resp.tracking_options.custom_redirect_domain #=> String
resp.delivery_options.tls_policy #=> String, one of "REQUIRE", "OPTIONAL"
resp.delivery_options.sending_pool_name #=> String
resp.reputation_options.reputation_metrics_enabled #=> true/false
resp.reputation_options.last_fresh_start #=> Time
resp.sending_options.sending_enabled #=> true/false
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String
resp.suppression_options.suppressed_reasons #=> Array
resp.suppression_options.suppressed_reasons[0] #=> String, one of "BOUNCE", "COMPLAINT"

Options Hash (options):

  • :configuration_set_name (required, String)

    The name of the configuration set that you want to obtain more information about.

Returns:

See Also:

#get_configuration_set_event_destinations(options = {}) ⇒ Types::GetConfigurationSetEventDestinationsResponse

Retrieve a list of event destinations that are associated with a configuration set.

Events include message sends, deliveries, opens, clicks, bounces, and complaints. Event destinations are places that you can send information about these events to. For example, you can send event data to Amazon SNS to receive notifications when you receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

Examples:

Request syntax with placeholder values


resp = client.get_configuration_set_event_destinations({
  configuration_set_name: "ConfigurationSetName", # required
})

Response structure


resp.event_destinations #=> Array
resp.event_destinations[0].name #=> String
resp.event_destinations[0].enabled #=> true/false
resp.event_destinations[0].matching_event_types #=> Array
resp.event_destinations[0].matching_event_types[0] #=> String, one of "SEND", "REJECT", "BOUNCE", "COMPLAINT", "DELIVERY", "OPEN", "CLICK", "RENDERING_FAILURE", "DELIVERY_DELAY", "SUBSCRIPTION"
resp.event_destinations[0].kinesis_firehose_destination.iam_role_arn #=> String
resp.event_destinations[0].kinesis_firehose_destination.delivery_stream_arn #=> String
resp.event_destinations[0].cloud_watch_destination.dimension_configurations #=> Array
resp.event_destinations[0].cloud_watch_destination.dimension_configurations[0].dimension_name #=> String
resp.event_destinations[0].cloud_watch_destination.dimension_configurations[0].dimension_value_source #=> String, one of "MESSAGE_TAG", "EMAIL_HEADER", "LINK_TAG"
resp.event_destinations[0].cloud_watch_destination.dimension_configurations[0].default_dimension_value #=> String
resp.event_destinations[0].sns_destination.topic_arn #=> String
resp.event_destinations[0].pinpoint_destination.application_arn #=> String

Options Hash (options):

  • :configuration_set_name (required, String)

    The name of the configuration set that contains the event destination.

Returns:

See Also:

#get_contact(options = {}) ⇒ Types::GetContactResponse

Returns a contact from a contact list.

Examples:

Request syntax with placeholder values


resp = client.get_contact({
  contact_list_name: "ContactListName", # required
  email_address: "EmailAddress", # required
})

Response structure


resp.contact_list_name #=> String
resp.email_address #=> String
resp.topic_preferences #=> Array
resp.topic_preferences[0].topic_name #=> String
resp.topic_preferences[0].subscription_status #=> String, one of "OPT_IN", "OPT_OUT"
resp.topic_default_preferences #=> Array
resp.topic_default_preferences[0].topic_name #=> String
resp.topic_default_preferences[0].subscription_status #=> String, one of "OPT_IN", "OPT_OUT"
resp.unsubscribe_all #=> true/false
resp.attributes_data #=> String
resp.created_timestamp #=> Time
resp.last_updated_timestamp #=> Time

Options Hash (options):

  • :contact_list_name (required, String)

    The name of the contact list to which the contact belongs.

  • :email_address (required, String)

    The contact\'s email addres.

Returns:

See Also:

#get_contact_list(options = {}) ⇒ Types::GetContactListResponse

Returns contact list metadata. It does not return any information about the contacts present in the list.

Examples:

Request syntax with placeholder values


resp = client.get_contact_list({
  contact_list_name: "ContactListName", # required
})

Response structure


resp.contact_list_name #=> String
resp.topics #=> Array
resp.topics[0].topic_name #=> String
resp.topics[0].display_name #=> String
resp.topics[0].description #=> String
resp.topics[0].default_subscription_status #=> String, one of "OPT_IN", "OPT_OUT"
resp.description #=> String
resp.created_timestamp #=> Time
resp.last_updated_timestamp #=> Time
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Options Hash (options):

  • :contact_list_name (required, String)

    The name of the contact list.

Returns:

See Also:

#get_custom_verification_email_template(options = {}) ⇒ Types::GetCustomVerificationEmailTemplateResponse

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.

Examples:

Request syntax with placeholder values


resp = client.get_custom_verification_email_template({
  template_name: "EmailTemplateName", # required
})

Response structure


resp.template_name #=> String
resp.from_email_address #=> String
resp.template_subject #=> String
resp.template_content #=> String
resp.success_redirection_url #=> String
resp.failure_redirection_url #=> String

Options Hash (options):

  • :template_name (required, String)

    The name of the custom verification email template that you want to retrieve.

Returns:

See Also:

#get_dedicated_ip(options = {}) ⇒ Types::GetDedicatedIpResponse

Get information about a dedicated IP address, including the name of the dedicated IP pool that it's associated with, as well information about the automatic warm-up process for the address.

Examples:

Request syntax with placeholder values


resp = client.get_dedicated_ip({
  ip: "Ip", # required
})

Response structure


resp.dedicated_ip.ip #=> String
resp.dedicated_ip.warmup_status #=> String, one of "IN_PROGRESS", "DONE"
resp.dedicated_ip.warmup_percentage #=> Integer
resp.dedicated_ip.pool_name #=> String

Options Hash (options):

  • :ip (required, String)

    The IP address that you want to obtain more information about. The value you specify has to be a dedicated IP address that\'s assocaited with your AWS account.

Returns:

See Also:

#get_dedicated_ips(options = {}) ⇒ Types::GetDedicatedIpsResponse

List the dedicated IP addresses that are associated with your AWS account.

Examples:

Request syntax with placeholder values


resp = client.get_dedicated_ips({
  pool_name: "PoolName",
  next_token: "NextToken",
  page_size: 1,
})

Response structure


resp.dedicated_ips #=> Array
resp.dedicated_ips[0].ip #=> String
resp.dedicated_ips[0].warmup_status #=> String, one of "IN_PROGRESS", "DONE"
resp.dedicated_ips[0].warmup_percentage #=> Integer
resp.dedicated_ips[0].pool_name #=> String
resp.next_token #=> String

Options Hash (options):

  • :pool_name (String)

    The name of the IP pool that the dedicated IP address is associated with.

  • :next_token (String)

    A token returned from a previous call to GetDedicatedIps to indicate the position of the dedicated IP pool in the list of IP pools.

  • :page_size (Integer)

    The number of results to show in a single call to GetDedicatedIpsRequest. If the number of results is larger than the number you specified in this parameter, then the response includes a NextToken element, which you can use to obtain additional results.

Returns:

See Also:

#get_deliverability_dashboard_options(options = {}) ⇒ Types::GetDeliverabilityDashboardOptionsResponse

Retrieve information about the status of the Deliverability dashboard for your account. When the Deliverability dashboard is enabled, you gain access to reputation, deliverability, and other metrics for the domains that you use to send email. You also gain the ability to perform predictive inbox placement tests.

When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition to any other fees that you accrue by using Amazon SES and other AWS services. For more information about the features and cost of a Deliverability dashboard subscription, see Amazon SES Pricing.

Examples:

Request syntax with placeholder values


resp = client.get_deliverability_dashboard_options()

Response structure


resp.dashboard_enabled #=> true/false
resp.subscription_expiry_date #=> Time
resp. #=> String, one of "ACTIVE", "PENDING_EXPIRATION", "DISABLED"
resp.active_subscribed_domains #=> Array
resp.active_subscribed_domains[0].domain #=> String
resp.active_subscribed_domains[0].subscription_start_date #=> Time
resp.active_subscribed_domains[0].inbox_placement_tracking_option.global #=> true/false
resp.active_subscribed_domains[0].inbox_placement_tracking_option.tracked_isps #=> Array
resp.active_subscribed_domains[0].inbox_placement_tracking_option.tracked_isps[0] #=> String
resp.pending_expiration_subscribed_domains #=> Array
resp.pending_expiration_subscribed_domains[0].domain #=> String
resp.pending_expiration_subscribed_domains[0].subscription_start_date #=> Time
resp.pending_expiration_subscribed_domains[0].inbox_placement_tracking_option.global #=> true/false
resp.pending_expiration_subscribed_domains[0].inbox_placement_tracking_option.tracked_isps #=> Array
resp.pending_expiration_subscribed_domains[0].inbox_placement_tracking_option.tracked_isps[0] #=> String

Returns:

See Also:

#get_deliverability_test_report(options = {}) ⇒ Types::GetDeliverabilityTestReportResponse

Retrieve the results of a predictive inbox placement test.

Examples:

Request syntax with placeholder values


resp = client.get_deliverability_test_report({
  report_id: "ReportId", # required
})

Response structure


resp.deliverability_test_report.report_id #=> String
resp.deliverability_test_report.report_name #=> String
resp.deliverability_test_report.subject #=> String
resp.deliverability_test_report.from_email_address #=> String
resp.deliverability_test_report.create_date #=> Time
resp.deliverability_test_report.deliverability_test_status #=> String, one of "IN_PROGRESS", "COMPLETED"
resp.overall_placement.inbox_percentage #=> Float
resp.overall_placement.spam_percentage #=> Float
resp.overall_placement.missing_percentage #=> Float
resp.overall_placement.spf_percentage #=> Float
resp.overall_placement.dkim_percentage #=> Float
resp.isp_placements #=> Array
resp.isp_placements[0].isp_name #=> String
resp.isp_placements[0].placement_statistics.inbox_percentage #=> Float
resp.isp_placements[0].placement_statistics.spam_percentage #=> Float
resp.isp_placements[0].placement_statistics.missing_percentage #=> Float
resp.isp_placements[0].placement_statistics.spf_percentage #=> Float
resp.isp_placements[0].placement_statistics.dkim_percentage #=> Float
resp.message #=> String
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Options Hash (options):

  • :report_id (required, String)

    A unique string that identifies the predictive inbox placement test.

Returns:

See Also:

#get_domain_deliverability_campaign(options = {}) ⇒ Types::GetDomainDeliverabilityCampaignResponse

Retrieve all the deliverability data for a specific campaign. This data is available for a campaign only if the campaign sent email by using a domain that the Deliverability dashboard is enabled for.

Examples:

Request syntax with placeholder values


resp = client.get_domain_deliverability_campaign({
  campaign_id: "CampaignId", # required
})

Response structure


resp.domain_deliverability_campaign.campaign_id #=> String
resp.domain_deliverability_campaign.image_url #=> String
resp.domain_deliverability_campaign.subject #=> String
resp.domain_deliverability_campaign.from_address #=> String
resp.domain_deliverability_campaign.sending_ips #=> Array
resp.domain_deliverability_campaign.sending_ips[0] #=> String
resp.domain_deliverability_campaign.first_seen_date_time #=> Time
resp.domain_deliverability_campaign.last_seen_date_time #=> Time
resp.domain_deliverability_campaign.inbox_count #=> Integer
resp.domain_deliverability_campaign.spam_count #=> Integer
resp.domain_deliverability_campaign.read_rate #=> Float
resp.domain_deliverability_campaign.delete_rate #=> Float
resp.domain_deliverability_campaign.read_delete_rate #=> Float
resp.domain_deliverability_campaign.projected_volume #=> Integer
resp.domain_deliverability_campaign.esps #=> Array
resp.domain_deliverability_campaign.esps[0] #=> String

Options Hash (options):

  • :campaign_id (required, String)

    The unique identifier for the campaign. The Deliverability dashboard automatically generates and assigns this identifier to a campaign.

Returns:

See Also:

#get_domain_statistics_report(options = {}) ⇒ Types::GetDomainStatisticsReportResponse

Retrieve inbox placement and engagement rates for the domains that you use to send email.

Examples:

Request syntax with placeholder values


resp = client.get_domain_statistics_report({
  domain: "Identity", # required
  start_date: Time.now, # required
  end_date: Time.now, # required
})

Response structure


resp.overall_volume.volume_statistics.inbox_raw_count #=> Integer
resp.overall_volume.volume_statistics.spam_raw_count #=> Integer
resp.overall_volume.volume_statistics.projected_inbox #=> Integer
resp.overall_volume.volume_statistics.projected_spam #=> Integer
resp.overall_volume.read_rate_percent #=> Float
resp.overall_volume.domain_isp_placements #=> Array
resp.overall_volume.domain_isp_placements[0].isp_name #=> String
resp.overall_volume.domain_isp_placements[0].inbox_raw_count #=> Integer
resp.overall_volume.domain_isp_placements[0].spam_raw_count #=> Integer
resp.overall_volume.domain_isp_placements[0].inbox_percentage #=> Float
resp.overall_volume.domain_isp_placements[0].spam_percentage #=> Float
resp.daily_volumes #=> Array
resp.daily_volumes[0].start_date #=> Time
resp.daily_volumes[0].volume_statistics.inbox_raw_count #=> Integer
resp.daily_volumes[0].volume_statistics.spam_raw_count #=> Integer
resp.daily_volumes[0].volume_statistics.projected_inbox #=> Integer
resp.daily_volumes[0].volume_statistics.projected_spam #=> Integer
resp.daily_volumes[0].domain_isp_placements #=> Array
resp.daily_volumes[0].domain_isp_placements[0].isp_name #=> String
resp.daily_volumes[0].domain_isp_placements[0].inbox_raw_count #=> Integer
resp.daily_volumes[0].domain_isp_placements[0].spam_raw_count #=> Integer
resp.daily_volumes[0].domain_isp_placements[0].inbox_percentage #=> Float
resp.daily_volumes[0].domain_isp_placements[0].spam_percentage #=> Float

Options Hash (options):

  • :domain (required, String)

    The domain that you want to obtain deliverability metrics for.

  • :start_date (required, Time)

    The first day (in Unix time) that you want to obtain domain deliverability metrics for.

  • :end_date (required, Time)

    The last day (in Unix time) that you want to obtain domain deliverability metrics for. The EndDate that you specify has to be less than or equal to 30 days after the StartDate.

Returns:

See Also:

#get_email_identity(options = {}) ⇒ Types::GetEmailIdentityResponse

Provides information about a specific identity, including the identity's verification status, sending authorization policies, its DKIM authentication status, and its custom Mail-From settings.

Examples:

Request syntax with placeholder values


resp = client.get_email_identity({
  email_identity: "Identity", # required
})

Response structure


resp.identity_type #=> String, one of "EMAIL_ADDRESS", "DOMAIN", "MANAGED_DOMAIN"
resp.feedback_forwarding_status #=> true/false
resp.verified_for_sending_status #=> true/false
resp.dkim_attributes.signing_enabled #=> true/false
resp.dkim_attributes.status #=> String, one of "PENDING", "SUCCESS", "FAILED", "TEMPORARY_FAILURE", "NOT_STARTED"
resp.dkim_attributes.tokens #=> Array
resp.dkim_attributes.tokens[0] #=> String
resp.dkim_attributes.signing_attributes_origin #=> String, one of "AWS_SES", "EXTERNAL"
resp.mail_from_attributes.mail_from_domain #=> String
resp.mail_from_attributes.mail_from_domain_status #=> String, one of "PENDING", "SUCCESS", "FAILED", "TEMPORARY_FAILURE"
resp.mail_from_attributes.behavior_on_mx_failure #=> String, one of "USE_DEFAULT_VALUE", "REJECT_MESSAGE"
resp.policies #=> Hash
resp.policies["PolicyName"] #=> String
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Options Hash (options):

  • :email_identity (required, String)

    The email identity that you want to retrieve details for.

Returns:

See Also:

#get_email_identity_policies(options = {}) ⇒ Types::GetEmailIdentityPoliciesResponse

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.

Examples:

Request syntax with placeholder values


resp = client.get_email_identity_policies({
  email_identity: "Identity", # required
})

Response structure


resp.policies #=> Hash
resp.policies["PolicyName"] #=> String

Options Hash (options):

  • :email_identity (required, String)

    The email identity that you want to retrieve policies for.

Returns:

See Also:

#get_email_template(options = {}) ⇒ Types::GetEmailTemplateResponse

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.

Examples:

Request syntax with placeholder values


resp = client.get_email_template({
  template_name: "EmailTemplateName", # required
})

Response structure


resp.template_name #=> String
resp.template_content.subject #=> String
resp.template_content.text #=> String
resp.template_content.html #=> String

Options Hash (options):

  • :template_name (required, String)

    The name of the template you want to retrieve.

Returns:

See Also:

#get_import_job(options = {}) ⇒ Types::GetImportJobResponse

Provides information about an import job.

Examples:

Request syntax with placeholder values


resp = client.get_import_job({
  job_id: "JobId", # required
})

Response structure


resp.job_id #=> String
resp.import_destination.suppression_list_destination.suppression_list_import_action #=> String, one of "DELETE", "PUT"
resp.import_destination.contact_list_destination.contact_list_name #=> String
resp.import_destination.contact_list_destination.contact_list_import_action #=> String, one of "DELETE", "PUT"
resp.import_data_source.s3_url #=> String
resp.import_data_source.data_format #=> String, one of "CSV", "JSON"
resp.failure_info.failed_records_s3_url #=> String
resp.failure_info.error_message #=> String
resp.job_status #=> String, one of "CREATED", "PROCESSING", "COMPLETED", "FAILED"
resp.created_timestamp #=> Time
resp.completed_timestamp #=> Time
resp.processed_records_count #=> Integer
resp.failed_records_count #=> Integer

Options Hash (options):

  • :job_id (required, String)

    The ID of the import job.

Returns:

See Also:

#get_suppressed_destination(options = {}) ⇒ Types::GetSuppressedDestinationResponse

Retrieves information about a specific email address that's on the suppression list for your account.

Examples:

Request syntax with placeholder values


resp = client.get_suppressed_destination({
  email_address: "EmailAddress", # required
})

Response structure


resp.suppressed_destination.email_address #=> String
resp.suppressed_destination.reason #=> String, one of "BOUNCE", "COMPLAINT"
resp.suppressed_destination.last_update_time #=> Time
resp.suppressed_destination.attributes.message_id #=> String
resp.suppressed_destination.attributes.feedback_id #=> String

Options Hash (options):

  • :email_address (required, String)

    The email address that\'s on the account suppression list.

Returns:

See Also:

#list_configuration_sets(options = {}) ⇒ Types::ListConfigurationSetsResponse

List all of the configuration sets associated with your account in the current region.

Configuration sets are groups of rules that you can apply to the emails you send. You apply a configuration set to an email by including a reference to the configuration set in the headers of the email. When you apply a configuration set to an email, all of the rules in that configuration set are applied to the email.

Examples:

Request syntax with placeholder values


resp = client.list_configuration_sets({
  next_token: "NextToken",
  page_size: 1,
})

Response structure


resp.configuration_sets #=> Array
resp.configuration_sets[0] #=> String
resp.next_token #=> String

Options Hash (options):

  • :next_token (String)

    A token returned from a previous call to ListConfigurationSets to indicate the position in the list of configuration sets.

  • :page_size (Integer)

    The number of results to show in a single call to ListConfigurationSets. If the number of results is larger than the number you specified in this parameter, then the response includes a NextToken element, which you can use to obtain additional results.

Returns:

See Also:

#list_contact_lists(options = {}) ⇒ Types::ListContactListsResponse

Lists all of the contact lists available.

Examples:

Request syntax with placeholder values


resp = client.list_contact_lists({
  page_size: 1,
  next_token: "NextToken",
})

Response structure


resp.contact_lists #=> Array
resp.contact_lists[0].contact_list_name #=> String
resp.contact_lists[0].last_updated_timestamp #=> Time
resp.next_token #=> String

Options Hash (options):

  • :page_size (Integer)

    Maximum number of contact lists to return at once. Use this parameter to paginate results. If additional contact lists exist beyond the specified limit, the NextToken element is sent in the response. Use the NextToken value in subsequent requests to retrieve additional lists.

  • :next_token (String)

    A string token indicating that there might be additional contact lists available to be listed. Use the token provided in the Response to use in the subsequent call to ListContactLists with the same parameters to retrieve the next page of contact lists.

Returns:

See Also:

#list_contacts(options = {}) ⇒ Types::ListContactsResponse

Lists the contacts present in a specific contact list.

Examples:

Request syntax with placeholder values


resp = client.list_contacts({
  contact_list_name: "ContactListName", # required
  filter: {
    filtered_status: "OPT_IN", # accepts OPT_IN, OPT_OUT
    topic_filter: {
      topic_name: "TopicName",
      use_default_if_preference_unavailable: false,
    },
  },
  page_size: 1,
  next_token: "NextToken",
})

Response structure


resp.contacts #=> Array
resp.contacts[0].email_address #=> String
resp.contacts[0].topic_preferences #=> Array
resp.contacts[0].topic_preferences[0].topic_name #=> String
resp.contacts[0].topic_preferences[0].subscription_status #=> String, one of "OPT_IN", "OPT_OUT"
resp.contacts[0].topic_default_preferences #=> Array
resp.contacts[0].topic_default_preferences[0].topic_name #=> String
resp.contacts[0].topic_default_preferences[0].subscription_status #=> String, one of "OPT_IN", "OPT_OUT"
resp.contacts[0].unsubscribe_all #=> true/false
resp.contacts[0].last_updated_timestamp #=> Time
resp.next_token #=> String

Options Hash (options):

  • :contact_list_name (required, String)

    The name of the contact list.

  • :filter (Types::ListContactsFilter)

    A filter that can be applied to a list of contacts.

  • :page_size (Integer)

    The number of contacts that may be returned at once, which is dependent on if there are more or less contacts than the value of the PageSize. Use this parameter to paginate results. If additional contacts exist beyond the specified limit, the NextToken element is sent in the response. Use the NextToken value in subsequent requests to retrieve additional contacts.

  • :next_token (String)

    A string token indicating that there might be additional contacts available to be listed. Use the token provided in the Response to use in the subsequent call to ListContacts with the same parameters to retrieve the next page of contacts.

Returns:

See Also:

#list_custom_verification_email_templates(options = {}) ⇒ Types::ListCustomVerificationEmailTemplatesResponse

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.

Examples:

Request syntax with placeholder values


resp = client.list_custom_verification_email_templates({
  next_token: "NextToken",
  page_size: 1,
})

Response structure


resp.custom_verification_email_templates #=> Array
resp.custom_verification_email_templates[0].template_name #=> String
resp.custom_verification_email_templates[0].from_email_address #=> String
resp.custom_verification_email_templates[0].template_subject #=> String
resp.custom_verification_email_templates[0].success_redirection_url #=> String
resp.custom_verification_email_templates[0].failure_redirection_url #=> String
resp.next_token #=> String

Options Hash (options):

  • :next_token (String)

    A token returned from a previous call to ListCustomVerificationEmailTemplates to indicate the position in the list of custom verification email templates.

  • :page_size (Integer)

    The number of results to show in a single call to ListCustomVerificationEmailTemplates. If the number of results is larger than the number you specified in this parameter, then the response includes a NextToken element, which you can use to obtain additional results.

    The value you specify has to be at least 1, and can be no more than 50.

Returns:

See Also:

#list_dedicated_ip_pools(options = {}) ⇒ Types::ListDedicatedIpPoolsResponse

List all of the dedicated IP pools that exist in your AWS account in the current Region.

Examples:

Request syntax with placeholder values


resp = client.list_dedicated_ip_pools({
  next_token: "NextToken",
  page_size: 1,
})

Response structure


resp.dedicated_ip_pools #=> Array
resp.dedicated_ip_pools[0] #=> String
resp.next_token #=> String

Options Hash (options):

  • :next_token (String)

    A token returned from a previous call to ListDedicatedIpPools to indicate the position in the list of dedicated IP pools.

  • :page_size (Integer)

    The number of results to show in a single call to ListDedicatedIpPools. If the number of results is larger than the number you specified in this parameter, then the response includes a NextToken element, which you can use to obtain additional results.

Returns:

See Also:

#list_deliverability_test_reports(options = {}) ⇒ Types::ListDeliverabilityTestReportsResponse

Show a list of the predictive inbox placement tests that you've performed, regardless of their statuses. For predictive inbox placement tests that are complete, you can use the GetDeliverabilityTestReport operation to view the results.

Examples:

Request syntax with placeholder values


resp = client.list_deliverability_test_reports({
  next_token: "NextToken",
  page_size: 1,
})

Response structure


resp.deliverability_test_reports #=> Array
resp.deliverability_test_reports[0].report_id #=> String
resp.deliverability_test_reports[0].report_name #=> String
resp.deliverability_test_reports[0].subject #=> String
resp.deliverability_test_reports[0].from_email_address #=> String
resp.deliverability_test_reports[0].create_date #=> Time
resp.deliverability_test_reports[0].deliverability_test_status #=> String, one of "IN_PROGRESS", "COMPLETED"
resp.next_token #=> String

Options Hash (options):

  • :next_token (String)

    A token returned from a previous call to ListDeliverabilityTestReports to indicate the position in the list of predictive inbox placement tests.

  • :page_size (Integer)

    The number of results to show in a single call to ListDeliverabilityTestReports. If the number of results is larger than the number you specified in this parameter, then the response includes a NextToken element, which you can use to obtain additional results.

    The value you specify has to be at least 0, and can be no more than 1000.

Returns:

See Also:

#list_domain_deliverability_campaigns(options = {}) ⇒ Types::ListDomainDeliverabilityCampaignsResponse

Retrieve deliverability data for all the campaigns that used a specific domain to send email during a specified time range. This data is available for a domain only if you enabled the Deliverability dashboard for the domain.

Examples:

Request syntax with placeholder values


resp = client.list_domain_deliverability_campaigns({
  start_date: Time.now, # required
  end_date: Time.now, # required
  subscribed_domain: "Domain", # required
  next_token: "NextToken",
  page_size: 1,
})

Response structure


resp.domain_deliverability_campaigns #=> Array
resp.domain_deliverability_campaigns[0].campaign_id #=> String
resp.domain_deliverability_campaigns[0].image_url #=> String
resp.domain_deliverability_campaigns[0].subject #=> String
resp.domain_deliverability_campaigns[0].from_address #=> String
resp.domain_deliverability_campaigns[0].sending_ips #=> Array
resp.domain_deliverability_campaigns[0].sending_ips[0] #=> String
resp.domain_deliverability_campaigns[0].first_seen_date_time #=> Time
resp.domain_deliverability_campaigns[0].last_seen_date_time #=> Time
resp.domain_deliverability_campaigns[0].inbox_count #=> Integer
resp.domain_deliverability_campaigns[0].spam_count #=> Integer
resp.domain_deliverability_campaigns[0].read_rate #=> Float
resp.domain_deliverability_campaigns[0].delete_rate #=> Float
resp.domain_deliverability_campaigns[0].read_delete_rate #=> Float
resp.domain_deliverability_campaigns[0].projected_volume #=> Integer
resp.domain_deliverability_campaigns[0].esps #=> Array
resp.domain_deliverability_campaigns[0].esps[0] #=> String
resp.next_token #=> String

Options Hash (options):

  • :start_date (required, Time)

    The first day, in Unix time format, that you want to obtain deliverability data for.

  • :end_date (required, Time)

    The last day, in Unix time format, that you want to obtain deliverability data for. This value has to be less than or equal to 30 days after the value of the StartDate parameter.

  • :subscribed_domain (required, String)

    The domain to obtain deliverability data for.

  • :next_token (String)

    A token that’s returned from a previous call to the ListDomainDeliverabilityCampaigns operation. This token indicates the position of a campaign in the list of campaigns.

  • :page_size (Integer)

    The maximum number of results to include in response to a single call to the ListDomainDeliverabilityCampaigns operation. If the number of results is larger than the number that you specify in this parameter, the response includes a NextToken element, which you can use to obtain additional results.

Returns:

See Also:

#list_email_identities(options = {}) ⇒ Types::ListEmailIdentitiesResponse

Returns a list of all of the email identities that are associated with your AWS account. An identity can be either an email address or a domain. This operation returns identities that are verified as well as those that aren't. This operation returns identities that are associated with Amazon SES and Amazon Pinpoint.

Examples:

Request syntax with placeholder values


resp = client.list_email_identities({
  next_token: "NextToken",
  page_size: 1,
})

Response structure


resp.email_identities #=> Array
resp.email_identities[0].identity_type #=> String, one of "EMAIL_ADDRESS", "DOMAIN", "MANAGED_DOMAIN"
resp.email_identities[0].identity_name #=> String
resp.email_identities[0].sending_enabled #=> true/false
resp.next_token #=> String

Options Hash (options):

  • :next_token (String)

    A token returned from a previous call to ListEmailIdentities to indicate the position in the list of identities.

  • :page_size (Integer)

    The number of results to show in a single call to ListEmailIdentities. If the number of results is larger than the number you specified in this parameter, then the response includes a NextToken element, which you can use to obtain additional results.

    The value you specify has to be at least 0, and can be no more than 1000.

Returns:

See Also:

#list_email_templates(options = {}) ⇒ Types::ListEmailTemplatesResponse

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.

Examples:

Request syntax with placeholder values


resp = client.list_email_templates({
  next_token: "NextToken",
  page_size: 1,
})

Response structure


resp. #=> Array
resp.[0].template_name #=> String
resp.[0].created_timestamp #=> Time
resp.next_token #=> String

Options Hash (options):

  • :next_token (String)

    A token returned from a previous call to ListEmailTemplates to indicate the position in the list of email templates.

  • :page_size (Integer)

    The number of results to show in a single call to ListEmailTemplates. If the number of results is larger than the number you specified in this parameter, then the response includes a NextToken element, which you can use to obtain additional results.

    The value you specify has to be at least 1, and can be no more than 10.

Returns:

See Also:

#list_import_jobs(options = {}) ⇒ Types::ListImportJobsResponse

Lists all of the import jobs.

Examples:

Request syntax with placeholder values


resp = client.list_import_jobs({
  import_destination_type: "SUPPRESSION_LIST", # accepts SUPPRESSION_LIST, CONTACT_LIST
  next_token: "NextToken",
  page_size: 1,
})

Response structure


resp.import_jobs #=> Array
resp.import_jobs[0].job_id #=> String
resp.import_jobs[0].import_destination.suppression_list_destination.suppression_list_import_action #=> String, one of "DELETE", "PUT"
resp.import_jobs[0].import_destination.contact_list_destination.contact_list_name #=> String
resp.import_jobs[0].import_destination.contact_list_destination.contact_list_import_action #=> String, one of "DELETE", "PUT"
resp.import_jobs[0].job_status #=> String, one of "CREATED", "PROCESSING", "COMPLETED", "FAILED"
resp.import_jobs[0].created_timestamp #=> Time
resp.next_token #=> String

Options Hash (options):

  • :import_destination_type (String)

    The destination of the import job, which can be used to list import jobs that have a certain ImportDestinationType.

  • :next_token (String)

    A string token indicating that there might be additional import jobs available to be listed. Copy this token to a subsequent call to ListImportJobs with the same parameters to retrieve the next page of import jobs.

  • :page_size (Integer)

    Maximum number of import jobs to return at once. Use this parameter to paginate results. If additional import jobs exist beyond the specified limit, the NextToken element is sent in the response. Use the NextToken value in subsequent requests to retrieve additional addresses.

Returns:

See Also:

#list_suppressed_destinations(options = {}) ⇒ Types::ListSuppressedDestinationsResponse

Retrieves a list of email addresses that are on the suppression list for your account.

Examples:

Request syntax with placeholder values


resp = client.list_suppressed_destinations({
  reasons: ["BOUNCE"], # accepts BOUNCE, COMPLAINT
  start_date: Time.now,
  end_date: Time.now,
  next_token: "NextToken",
  page_size: 1,
})

Response structure


resp.suppressed_destination_summaries #=> Array
resp.suppressed_destination_summaries[0].email_address #=> String
resp.suppressed_destination_summaries[0].reason #=> String, one of "BOUNCE", "COMPLAINT"
resp.suppressed_destination_summaries[0].last_update_time #=> Time
resp.next_token #=> String

Options Hash (options):

  • :reasons (Array<String>)

    The factors that caused the email address to be added to .

  • :start_date (Time)

    Used to filter the list of suppressed email destinations so that it only includes addresses that were added to the list after a specific date. The date that you specify should be in Unix time format.

  • :end_date (Time)

    Used to filter the list of suppressed email destinations so that it only includes addresses that were added to the list before a specific date. The date that you specify should be in Unix time format.

  • :next_token (String)

    A token returned from a previous call to ListSuppressedDestinations to indicate the position in the list of suppressed email addresses.

  • :page_size (Integer)

    The number of results to show in a single call to ListSuppressedDestinations. If the number of results is larger than the number you specified in this parameter, then the response includes a NextToken element, which you can use to obtain additional results.

Returns:

See Also:

#list_tags_for_resource(options = {}) ⇒ Types::ListTagsForResourceResponse

Retrieve a list of the tags (keys and values) that are associated with a specified resource. A tag is a label that you optionally define and associate with a resource. Each tag consists of a required tag key and an optional associated tag value. A tag key is a general label that acts as a category for more specific tag values. A tag value acts as a descriptor within a tag key.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "AmazonResourceName", # required
})

Response structure


resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Options Hash (options):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource that you want to retrieve tag information for.

Returns:

See Also:

#put_account_dedicated_ip_warmup_attributes(options = {}) ⇒ Struct

Enable or disable the automatic warm-up feature for dedicated IP addresses.

Examples:

Request syntax with placeholder values


resp = client.({
  auto_warmup_enabled: false,
})

Options Hash (options):

  • :auto_warmup_enabled (Boolean)

    Enables or disables the automatic warm-up feature for dedicated IP addresses that are associated with your Amazon SES account in the current AWS Region. Set to true to enable the automatic warm-up feature, or set to false to disable it.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_account_details(options = {}) ⇒ Struct

Update your Amazon SES account details.

Examples:

Request syntax with placeholder values


resp = client.({
  mail_type: "MARKETING", # required, accepts MARKETING, TRANSACTIONAL
  website_url: "WebsiteURL", # required
  contact_language: "EN", # accepts EN, JA
  use_case_description: "UseCaseDescription", # required
  additional_contact_email_addresses: ["AdditionalContactEmailAddress"],
  production_access_enabled: false,
})

Options Hash (options):

  • :mail_type (required, String)

    The type of email your account will send.

  • :website_url (required, String)

    The URL of your website. This information helps us better understand the type of content that you plan to send.

  • :contact_language (String)

    The language you would prefer to be contacted with.

  • :use_case_description (required, String)

    A description of the types of email that you plan to send.

  • :additional_contact_email_addresses (Array<String>)

    Additional email addresses that you would like to be notified regarding Amazon SES matters.

  • :production_access_enabled (Boolean)

    Indicates whether or not your account should have production access in the current AWS Region.

    If the value is false, then your account is in the sandbox. When your account is in the sandbox, you can only send email to verified identities. Additionally, the maximum number of emails you can send in a 24-hour period (your sending quota) is 200, and the maximum number of emails you can send per second (your maximum sending rate) is 1.

    If the value is true, then your account has production access. When your account has production access, you can send email to any address. The sending quota and maximum sending rate for your account vary based on your specific use case.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_account_sending_attributes(options = {}) ⇒ Struct

Enable or disable the ability of your account to send email.

Examples:

Request syntax with placeholder values


resp = client.({
  sending_enabled: false,
})

Options Hash (options):

  • :sending_enabled (Boolean)

    Enables or disables your account\'s ability to send email. Set to true to enable email sending, or set to false to disable email sending.

    If AWS paused your account\'s ability to send email, you can\'t use this operation to resume your account\'s ability to send email.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_account_suppression_attributes(options = {}) ⇒ Struct

Change the settings for the account-level suppression list.

Examples:

Request syntax with placeholder values


resp = client.({
  suppressed_reasons: ["BOUNCE"], # accepts BOUNCE, COMPLAINT
})

Options Hash (options):

  • :suppressed_reasons (Array<String>)

    A list that contains the reasons that email addresses will be automatically added to the suppression list for your account. This list can contain any or all of the following:

    • COMPLAINT – Amazon SES adds an email address to the suppression list for your account when a message sent to that address results in a complaint.

    • BOUNCE – Amazon SES adds an email address to the suppression list for your account when a message sent to that address results in a hard bounce.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_configuration_set_delivery_options(options = {}) ⇒ Struct

Associate a configuration set with a dedicated IP pool. You can use dedicated IP pools to create groups of dedicated IP addresses for sending specific types of email.

Examples:

Request syntax with placeholder values


resp = client.put_configuration_set_delivery_options({
  configuration_set_name: "ConfigurationSetName", # required
  tls_policy: "REQUIRE", # accepts REQUIRE, OPTIONAL
  sending_pool_name: "SendingPoolName",
})

Options Hash (options):

  • :configuration_set_name (required, String)

    The name of the configuration set that you want to associate with a dedicated IP pool.

  • :tls_policy (String)

    Specifies whether messages that use the configuration set are required to use Transport Layer Security (TLS). If the value is Require, messages are only delivered if a TLS connection can be established. If the value is Optional, messages can be delivered in plain text if a TLS connection can\'t be established.

  • :sending_pool_name (String)

    The name of the dedicated IP pool that you want to associate with the configuration set.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_configuration_set_reputation_options(options = {}) ⇒ Struct

Enable or disable collection of reputation metrics for emails that you send using a particular configuration set in a specific AWS Region.

Examples:

Request syntax with placeholder values


resp = client.put_configuration_set_reputation_options({
  configuration_set_name: "ConfigurationSetName", # required
  reputation_metrics_enabled: false,
})

Options Hash (options):

  • :configuration_set_name (required, String)

    The name of the configuration set that you want to enable or disable reputation metric tracking for.

  • :reputation_metrics_enabled (Boolean)

    If true, tracking of reputation metrics is enabled for the configuration set. If false, tracking of reputation metrics is disabled for the configuration set.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_configuration_set_sending_options(options = {}) ⇒ Struct

Enable or disable email sending for messages that use a particular configuration set in a specific AWS Region.

Examples:

Request syntax with placeholder values


resp = client.put_configuration_set_sending_options({
  configuration_set_name: "ConfigurationSetName", # required
  sending_enabled: false,
})

Options Hash (options):

  • :configuration_set_name (required, String)

    The name of the configuration set that you want to enable or disable email sending for.

  • :sending_enabled (Boolean)

    If true, email sending is enabled for the configuration set. If false, email sending is disabled for the configuration set.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_configuration_set_suppression_options(options = {}) ⇒ Struct

Specify the account suppression list preferences for a configuration set.

Examples:

Request syntax with placeholder values


resp = client.put_configuration_set_suppression_options({
  configuration_set_name: "ConfigurationSetName", # required
  suppressed_reasons: ["BOUNCE"], # accepts BOUNCE, COMPLAINT
})

Options Hash (options):

  • :configuration_set_name (required, String)

    The name of the configuration set that you want to change the suppression list preferences for.

  • :suppressed_reasons (Array<String>)

    A list that contains the reasons that email addresses are automatically added to the suppression list for your account. This list can contain any or all of the following:

    • COMPLAINT – Amazon SES adds an email address to the suppression list for your account when a message sent to that address results in a complaint.

    • BOUNCE – Amazon SES adds an email address to the suppression list for your account when a message sent to that address results in a hard bounce.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_configuration_set_tracking_options(options = {}) ⇒ Struct

Specify a custom domain to use for open and click tracking elements in email that you send.

Examples:

Request syntax with placeholder values


resp = client.put_configuration_set_tracking_options({
  configuration_set_name: "ConfigurationSetName", # required
  custom_redirect_domain: "CustomRedirectDomain",
})

Options Hash (options):

  • :configuration_set_name (required, String)

    The name of the configuration set that you want to add a custom tracking domain to.

  • :custom_redirect_domain (String)

    The domain that you want to use to track open and click events.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_dedicated_ip_in_pool(options = {}) ⇒ Struct

Move a dedicated IP address to an existing dedicated IP pool.

The dedicated IP address that you specify must already exist, and must be associated with your AWS account.

The dedicated IP pool you specify must already exist. You can create a new pool by using the CreateDedicatedIpPool operation.

Examples:

Request syntax with placeholder values


resp = client.put_dedicated_ip_in_pool({
  ip: "Ip", # required
  destination_pool_name: "PoolName", # required
})

Options Hash (options):

  • :ip (required, String)

    The IP address that you want to move to the dedicated IP pool. The value you specify has to be a dedicated IP address that\'s associated with your AWS account.

  • :destination_pool_name (required, String)

    The name of the IP pool that you want to add the dedicated IP address to. You have to specify an IP pool that already exists.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_dedicated_ip_warmup_attributes(options = {}) ⇒ Struct

Examples:

Request syntax with placeholder values


resp = client.put_dedicated_ip_warmup_attributes({
  ip: "Ip", # required
  warmup_percentage: 1, # required
})

Options Hash (options):

  • :ip (required, String)

    The dedicated IP address that you want to update the warm-up attributes for.

  • :warmup_percentage (required, Integer)

    The warm-up percentage that you want to associate with the dedicated IP address.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_deliverability_dashboard_option(options = {}) ⇒ Struct

Enable or disable the Deliverability dashboard. When you enable the Deliverability dashboard, you gain access to reputation, deliverability, and other metrics for the domains that you use to send email. You also gain the ability to perform predictive inbox placement tests.

When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition to any other fees that you accrue by using Amazon SES and other AWS services. For more information about the features and cost of a Deliverability dashboard subscription, see Amazon SES Pricing.

Examples:

Request syntax with placeholder values


resp = client.put_deliverability_dashboard_option({
  dashboard_enabled: false, # required
  subscribed_domains: [
    {
      domain: "Domain",
      subscription_start_date: Time.now,
      inbox_placement_tracking_option: {
        global: false,
        tracked_isps: ["IspName"],
      },
    },
  ],
})

Options Hash (options):

  • :dashboard_enabled (required, Boolean)

    Specifies whether to enable the Deliverability dashboard. To enable the dashboard, set this value to true.

  • :subscribed_domains (Array<Types::DomainDeliverabilityTrackingOption>)

    An array of objects, one for each verified domain that you use to send email and enabled the Deliverability dashboard for.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_email_identity_dkim_attributes(options = {}) ⇒ Struct

Used to enable or disable DKIM authentication for an email identity.

Examples:

Request syntax with placeholder values


resp = client.put_email_identity_dkim_attributes({
  email_identity: "Identity", # required
  signing_enabled: false,
})

Options Hash (options):

  • :email_identity (required, String)

    The email identity that you want to change the DKIM settings for.

  • :signing_enabled (Boolean)

    Sets the DKIM signing configuration for the identity.

    When you set this value true, then the messages that are sent from the identity are signed using DKIM. If you set this value to false, your messages are sent without DKIM signing.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_email_identity_dkim_signing_attributes(options = {}) ⇒ Types::PutEmailIdentityDkimSigningAttributesResponse

Used to configure or change the DKIM authentication settings for an email domain identity. You can use this operation to do any of the following:

  • Update the signing attributes for an identity that uses Bring Your Own DKIM (BYODKIM).

  • Change from using no DKIM authentication to using Easy DKIM.

  • Change from using no DKIM authentication to using BYODKIM.

  • Change from using Easy DKIM to using BYODKIM.

  • Change from using BYODKIM to using Easy DKIM.

Examples:

Request syntax with placeholder values


resp = client.put_email_identity_dkim_signing_attributes({
  email_identity: "Identity", # required
  signing_attributes_origin: "AWS_SES", # required, accepts AWS_SES, EXTERNAL
  signing_attributes: {
    domain_signing_selector: "Selector", # required
    domain_signing_private_key: "PrivateKey", # required
  },
})

Response structure


resp.dkim_status #=> String, one of "PENDING", "SUCCESS", "FAILED", "TEMPORARY_FAILURE", "NOT_STARTED"
resp.dkim_tokens #=> Array
resp.dkim_tokens[0] #=> String

Options Hash (options):

  • :email_identity (required, String)

    The email identity that you want to configure DKIM for.

  • :signing_attributes_origin (required, String)

    The method that you want to use to configure DKIM for the identity. There are two possible values:

    • AWS_SES – Configure DKIM for the identity by using Easy DKIM.

    • EXTERNAL – Configure DKIM for the identity by using Bring Your Own DKIM (BYODKIM).

  • :signing_attributes (Types::DkimSigningAttributes)

    An object that contains information about the private key and selector that you want to use to configure DKIM for the identity. This object is only required if you want to configure Bring Your Own DKIM (BYODKIM) for the identity.

Returns:

See Also:

#put_email_identity_feedback_attributes(options = {}) ⇒ Struct

Used to enable or disable feedback forwarding for an identity. This setting determines what happens when an identity is used to send an email that results in a bounce or complaint event.

If the value is true, you receive email notifications when bounce or complaint events occur. These notifications are sent to the address that you specified in the Return-Path header of the original email.

You're required to have a method of tracking bounces and complaints. If you haven't set up another mechanism for receiving bounce or complaint notifications (for example, by setting up an event destination), you receive an email notification when these events occur (even if this setting is disabled).

Examples:

Request syntax with placeholder values


resp = client.put_email_identity_feedback_attributes({
  email_identity: "Identity", # required
  email_forwarding_enabled: false,
})

Options Hash (options):

  • :email_identity (required, String)

    The email identity that you want to configure bounce and complaint feedback forwarding for.

  • :email_forwarding_enabled (Boolean)

    Sets the feedback forwarding configuration for the identity.

    If the value is true, you receive email notifications when bounce or complaint events occur. These notifications are sent to the address that you specified in the Return-Path header of the original email.

    You\'re required to have a method of tracking bounces and complaints. If you haven\'t set up another mechanism for receiving bounce or complaint notifications (for example, by setting up an event destination), you receive an email notification when these events occur (even if this setting is disabled).

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_email_identity_mail_from_attributes(options = {}) ⇒ Struct

Used to enable or disable the custom Mail-From domain configuration for an email identity.

Examples:

Request syntax with placeholder values


resp = client.put_email_identity_mail_from_attributes({
  email_identity: "Identity", # required
  mail_from_domain: "MailFromDomainName",
  behavior_on_mx_failure: "USE_DEFAULT_VALUE", # accepts USE_DEFAULT_VALUE, REJECT_MESSAGE
})

Options Hash (options):

  • :email_identity (required, String)

    The verified email identity that you want to set up the custom MAIL FROM domain for.

  • :mail_from_domain (String)

    The custom MAIL FROM domain that you want the verified identity to use. The MAIL FROM domain must meet the following criteria:

    • It has to be a subdomain of the verified identity.

    • It can\'t be used to receive email.

    • It can\'t be used in a \"From\" address if the MAIL FROM domain is a destination for feedback forwarding emails.

  • :behavior_on_mx_failure (String)

    The action that you want to take if the required MX record isn\'t found when you send an email. When you set this value to UseDefaultValue, the mail is sent using amazonses.com as the MAIL FROM domain. When you set this value to RejectMessage, the Amazon SES API v2 returns a MailFromDomainNotVerified error, and doesn\'t attempt to deliver the email.

    These behaviors are taken when the custom MAIL FROM domain configuration is in the Pending, Failed, and TemporaryFailure states.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_suppressed_destination(options = {}) ⇒ Struct

Adds an email address to the suppression list for your account.

Examples:

Request syntax with placeholder values


resp = client.put_suppressed_destination({
  email_address: "EmailAddress", # required
  reason: "BOUNCE", # required, accepts BOUNCE, COMPLAINT
})

Options Hash (options):

  • :email_address (required, String)

    The email address that should be added to the suppression list for your account.

  • :reason (required, String)

    The factors that should cause the email address to be added to the suppression list for your account.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#send_bulk_email(options = {}) ⇒ Types::SendBulkEmailResponse

Composes an email message to multiple destinations.

Examples:

Request syntax with placeholder values


resp = client.send_bulk_email({
  from_email_address: "EmailAddress",
  from_email_address_identity_arn: "AmazonResourceName",
  reply_to_addresses: ["EmailAddress"],
  feedback_forwarding_email_address: "EmailAddress",
  feedback_forwarding_email_address_identity_arn: "AmazonResourceName",
  default_email_tags: [
    {
      name: "MessageTagName", # required
      value: "MessageTagValue", # required
    },
  ],
  default_content: { # required
    template: {
      template_name: "EmailTemplateName",
      template_arn: "AmazonResourceName",
      template_data: "EmailTemplateData",
    },
  },
  bulk_email_entries: [ # required
    {
      destination: { # required
        to_addresses: ["EmailAddress"],
        cc_addresses: ["EmailAddress"],
        bcc_addresses: ["EmailAddress"],
      },
      replacement_tags: [
        {
          name: "MessageTagName", # required
          value: "MessageTagValue", # required
        },
      ],
      replacement_email_content: {
        replacement_template: {
          replacement_template_data: "EmailTemplateData",
        },
      },
    },
  ],
  configuration_set_name: "ConfigurationSetName",
})

Response structure


resp.bulk_email_entry_results #=> Array
resp.bulk_email_entry_results[0].status #=> String, one of "SUCCESS", "MESSAGE_REJECTED", "MAIL_FROM_DOMAIN_NOT_VERIFIED", "CONFIGURATION_SET_NOT_FOUND", "TEMPLATE_NOT_FOUND", "ACCOUNT_SUSPENDED", "ACCOUNT_THROTTLED", "ACCOUNT_DAILY_QUOTA_EXCEEDED", "INVALID_SENDING_POOL_NAME", "ACCOUNT_SENDING_PAUSED", "CONFIGURATION_SET_SENDING_PAUSED", "INVALID_PARAMETER", "TRANSIENT_FAILURE", "FAILED"
resp.bulk_email_entry_results[0].error #=> String
resp.bulk_email_entry_results[0].message_id #=> String

Options Hash (options):

  • :from_email_address (String)

    The email address that you want to use as the \"From\" address for the email. The address that you specify has to be verified.

  • :from_email_address_identity_arn (String)

    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 FromEmailAddress 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 sender@example.com, then you would specify the FromEmailAddressIdentityArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the FromEmailAddress to be sender@example.com.

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

  • :reply_to_addresses (Array<String>)

    The \"Reply-to\" email addresses for the message. When the recipient replies to the message, each Reply-to address receives the reply.

  • :feedback_forwarding_email_address (String)

    The address that you want bounce and complaint notifications to be sent to.

  • :feedback_forwarding_email_address_identity_arn (String)

    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 FeedbackForwardingEmailAddress 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 FeedbackForwardingEmailAddressIdentityArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the FeedbackForwardingEmailAddress to be feedback@example.com.

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

  • :default_email_tags (Array<Types::MessageTag>)

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

  • :default_content (required, Types::BulkEmailContent)

    An object that contains the body of the message. You can specify a template message.

  • :bulk_email_entries (required, Array<Types::BulkEmailEntry>)

    The list of bulk email entry objects.

  • :configuration_set_name (String)

    The name of the configuration set that you want to use when sending the email.

Returns:

See Also:

#send_custom_verification_email(options = {}) ⇒ Types::SendCustomVerificationEmailResponse

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.

Examples:

Request syntax with placeholder values


resp = client.send_custom_verification_email({
  email_address: "EmailAddress", # required
  template_name: "EmailTemplateName", # required
  configuration_set_name: "ConfigurationSetName",
})

Response structure


resp.message_id #=> String

Options Hash (options):

  • :email_address (required, String)

    The email address to verify.

  • :template_name (required, String)

    The name of the custom verification email template to use when sending the verification email.

  • :configuration_set_name (String)

    Name of a configuration set to use when sending the verification email.

Returns:

See Also:

#send_email(options = {}) ⇒ Types::SendEmailResponse

Sends an email message. You can use the Amazon SES API v2 to send two types of messages:

  • Simple – A standard email message. When you create this type of message, you specify the sender, the recipient, and the message body, and Amazon SES assembles the message for you.

  • Raw – A raw, MIME-formatted email message. When you send this type of email, you have to specify all of the message headers, as well as the message body. You can use this message type to send messages that contain attachments. The message that you specify has to be a valid MIME message.

  • Templated – A message that contains personalization tags. When you send this type of email, Amazon SES API v2 automatically replaces the tags with values that you specify.

Examples:

Request syntax with placeholder values


resp = client.send_email({
  from_email_address: "EmailAddress",
  from_email_address_identity_arn: "AmazonResourceName",
  destination: {
    to_addresses: ["EmailAddress"],
    cc_addresses: ["EmailAddress"],
    bcc_addresses: ["EmailAddress"],
  },
  reply_to_addresses: ["EmailAddress"],
  feedback_forwarding_email_address: "EmailAddress",
  feedback_forwarding_email_address_identity_arn: "AmazonResourceName",
  content: { # required
    simple: {
      subject: { # required
        data: "MessageData", # required
        charset: "Charset",
      },
      body: { # required
        text: {
          data: "MessageData", # required
          charset: "Charset",
        },
        html: {
          data: "MessageData", # required
          charset: "Charset",
        },
      },
    },
    raw: {
      data: "data", # required
    },
    template: {
      template_name: "EmailTemplateName",
      template_arn: "AmazonResourceName",
      template_data: "EmailTemplateData",
    },
  },
  email_tags: [
    {
      name: "MessageTagName", # required
      value: "MessageTagValue", # required
    },
  ],
  configuration_set_name: "ConfigurationSetName",
  list_management_options: {
    contact_list_name: "ContactListName", # required
    topic_name: "TopicName",
  },
})

Response structure


resp.message_id #=> String

Options Hash (options):

  • :from_email_address (String)

    The email address that you want to use as the \"From\" address for the email. The address that you specify has to be verified.

  • :from_email_address_identity_arn (String)

    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 FromEmailAddress 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 sender@example.com, then you would specify the FromEmailAddressIdentityArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the FromEmailAddress to be sender@example.com.

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

    For Raw emails, the FromEmailAddressIdentityArn value overrides the X-SES-SOURCE-ARN and X-SES-FROM-ARN headers specified in raw email message content.

  • :destination (Types::Destination)

    An object that contains the recipients of the email message.

  • :reply_to_addresses (Array<String>)

    The \"Reply-to\" email addresses for the message. When the recipient replies to the message, each Reply-to address receives the reply.

  • :feedback_forwarding_email_address (String)

    The address that you want bounce and complaint notifications to be sent to.

  • :feedback_forwarding_email_address_identity_arn (String)

    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 FeedbackForwardingEmailAddress 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 FeedbackForwardingEmailAddressIdentityArn to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the FeedbackForwardingEmailAddress to be feedback@example.com.

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

  • :content (required, Types::EmailContent)

    An object that contains the body of the message. You can send either a Simple message Raw message or a template Message.

  • :email_tags (Array<Types::MessageTag>)

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

  • :configuration_set_name (String)

    The name of the configuration set that you want to use when sending the email.

  • :list_management_options (Types::ListManagementOptions)

    An object used to specify a list or topic to which an email belongs, which will be used when a contact chooses to unsubscribe.

Returns:

See Also:

#tag_resource(options = {}) ⇒ Struct

Add one or more tags (keys and values) to a specified resource. A tag is a label that you optionally define and associate with a resource. Tags can help you categorize and manage resources in different ways, such as by purpose, owner, environment, or other criteria. A resource can have as many as 50 tags.

Each tag consists of a required tag key and an associated tag value, both of which you define. A tag key is a general label that acts as a category for more specific tag values. A tag value acts as a descriptor within a tag key.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "AmazonResourceName", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Options Hash (options):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource that you want to add one or more tags to.

  • :tags (required, Array<Types::Tag>)

    A list of the tags that you want to add to the resource. A tag consists of a required tag key (Key) and an associated tag value (Value). The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#test_render_email_template(options = {}) ⇒ Types::TestRenderEmailTemplateResponse

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.

Examples:

Request syntax with placeholder values


resp = client.test_render_email_template({
  template_name: "EmailTemplateName", # required
  template_data: "EmailTemplateData", # required
})

Response structure


resp.rendered_template #=> String

Options Hash (options):

  • :template_name (required, String)

    The name of the template that you want to render.

  • :template_data (required, String)

    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.

Returns:

See Also:

#untag_resource(options = {}) ⇒ Struct

Remove one or more tags (keys and values) from a specified resource.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "AmazonResourceName", # required
  tag_keys: ["TagKey"], # required
})

Options Hash (options):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource that you want to remove one or more tags from.

  • :tag_keys (required, Array<String>)

    The tags (tag keys) that you want to remove from the resource. When you specify a tag key, the action removes both that key and its associated tag value.

    To remove more than one tag from the resource, append the TagKeys parameter and argument for each additional tag to remove, separated by an ampersand. For example: /v2/email/tags?ResourceArn=ResourceArn&TagKeys=Key1&TagKeys=Key2

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_configuration_set_event_destination(options = {}) ⇒ Struct

Update the configuration of an event destination for a configuration set.

Events include message sends, deliveries, opens, clicks, bounces, and complaints. Event destinations are places that you can send information about these events to. For example, you can send event data to Amazon SNS to receive notifications when you receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

Examples:

Request syntax with placeholder values


resp = client.update_configuration_set_event_destination({
  configuration_set_name: "ConfigurationSetName", # required
  event_destination_name: "EventDestinationName", # required
  event_destination: { # required
    enabled: false,
    matching_event_types: ["SEND"], # accepts SEND, REJECT, BOUNCE, COMPLAINT, DELIVERY, OPEN, CLICK, RENDERING_FAILURE, DELIVERY_DELAY, SUBSCRIPTION
    kinesis_firehose_destination: {
      iam_role_arn: "AmazonResourceName", # required
      delivery_stream_arn: "AmazonResourceName", # required
    },
    cloud_watch_destination: {
      dimension_configurations: [ # required
        {
          dimension_name: "DimensionName", # required
          dimension_value_source: "MESSAGE_TAG", # required, accepts MESSAGE_TAG, EMAIL_HEADER, LINK_TAG
          default_dimension_value: "DefaultDimensionValue", # required
        },
      ],
    },
    sns_destination: {
      topic_arn: "AmazonResourceName", # required
    },
    pinpoint_destination: {
      application_arn: "AmazonResourceName",
    },
  },
})

Options Hash (options):

  • :configuration_set_name (required, String)

    The name of the configuration set that contains the event destination that you want to modify.

  • :event_destination_name (required, String)

    The name of the event destination that you want to modify.

  • :event_destination (required, Types::EventDestinationDefinition)

    An object that defines the event destination.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_contact(options = {}) ⇒ Struct

Updates a contact's preferences for a list. It is not necessary to specify all existing topic preferences in the TopicPreferences object, just the ones that need updating.

Examples:

Request syntax with placeholder values


resp = client.update_contact({
  contact_list_name: "ContactListName", # required
  email_address: "EmailAddress", # required
  topic_preferences: [
    {
      topic_name: "TopicName", # required
      subscription_status: "OPT_IN", # required, accepts OPT_IN, OPT_OUT
    },
  ],
  unsubscribe_all: false,
  attributes_data: "AttributesData",
})

Options Hash (options):

  • :contact_list_name (required, String)

    The name of the contact list.

  • :email_address (required, String)

    The contact\'s email addres.

  • :topic_preferences (Array<Types::TopicPreference>)

    The contact\'s preference for being opted-in to or opted-out of a topic.

  • :unsubscribe_all (Boolean)

    A boolean value status noting if the contact is unsubscribed from all contact list topics.

  • :attributes_data (String)

    The attribute data attached to a contact.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_contact_list(options = {}) ⇒ Struct

Updates contact list metadata. This operation does a complete replacement.

Examples:

Request syntax with placeholder values


resp = client.update_contact_list({
  contact_list_name: "ContactListName", # required
  topics: [
    {
      topic_name: "TopicName", # required
      display_name: "DisplayName", # required
      description: "Description",
      default_subscription_status: "OPT_IN", # required, accepts OPT_IN, OPT_OUT
    },
  ],
  description: "Description",
})

Options Hash (options):

  • :contact_list_name (required, String)

    The name of the contact list.

  • :topics (Array<Types::Topic>)

    An interest group, theme, or label within a list. A contact list can have multiple topics.

  • :description (String)

    A description of what the contact list is about.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_custom_verification_email_template(options = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.update_custom_verification_email_template({
  template_name: "EmailTemplateName", # required
  from_email_address: "EmailAddress", # required
  template_subject: "EmailTemplateSubject", # required
  template_content: "TemplateContent", # required
  success_redirection_url: "SuccessRedirectionURL", # required
  failure_redirection_url: "FailureRedirectionURL", # required
})

Options Hash (options):

  • :template_name (required, String)

    The name of the custom verification email template that you want to update.

  • :from_email_address (required, String)

    The email address that the custom verification email is sent from.

  • :template_subject (required, String)

    The subject line of the custom verification email.

  • :template_content (required, String)

    The content of the custom verification email. The total size of the email must be less than 10 MB. The message body may contain HTML, with some limitations. For more information, see Custom Verification Email Frequently Asked Questions in the Amazon SES Developer Guide.

  • :success_redirection_url (required, String)

    The URL that the recipient of the verification email is sent to if his or her address is successfully verified.

  • :failure_redirection_url (required, String)

    The URL that the recipient of the verification email is sent to if his or her address is not successfully verified.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_email_identity_policy(options = {}) ⇒ Struct

Updates 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.

Examples:

Request syntax with placeholder values


resp = client.update_email_identity_policy({
  email_identity: "Identity", # required
  policy_name: "PolicyName", # required
  policy: "Policy", # required
})

Options Hash (options):

  • :email_identity (required, String)

    The email identity for which you want to update policy.

  • :policy_name (required, String)

    The name of the policy.

    The policy name cannot exceed 64 characters and can only include alphanumeric characters, dashes, and underscores.

  • :policy (required, String)

    The text of the policy in JSON format. The policy cannot exceed 4 KB.

    For information about the syntax of sending authorization policies, see the Amazon SES Developer Guide.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_email_template(options = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.update_email_template({
  template_name: "EmailTemplateName", # required
  template_content: { # required
    subject: "EmailTemplateSubject",
    text: "EmailTemplateText",
    html: "EmailTemplateHtml",
  },
})

Options Hash (options):

  • :template_name (required, String)

    The name of the template you want to update.

  • :template_content (required, Types::EmailTemplateContent)

    The content of the email template, composed of a subject line, an HTML part, and a text-only part.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean

Waiters polls an API operation until a resource enters a desired state.

Basic Usage

Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.

# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:

# poll for ~25 seconds
client.wait_until(...) do |w|
  w.max_attempts = 5
  w.delay = 5
end

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(...) do |w|

  # disable max attempts
  w.max_attempts = nil

  # poll for 1 hour, instead of a number of attempts
  w.before_wait do |attempts, response|
    throw :failure if Time.now - started_at > 3600
  end

end

Handling Errors

When a waiter is successful, it returns true. When a waiter fails, it raises an error. All errors raised extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Parameters:

  • waiter_name (Symbol)

    The name of the waiter. See #waiter_names for a full list of supported waiters.

  • params (Hash) (defaults to: {})

    Additional request parameters. See the #waiter_names for a list of supported waiters and what request they call. The called request determines the list of accepted parameters.

Yield Parameters:

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.

#waiter_namesArray<Symbol>

Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:

Waiter NameClient MethodDefault Delay:Default Max Attempts:

Returns:

  • (Array<Symbol>)

    the list of supported waiters.