The AWS SDK for JavaScript v2 has reached end-of-support.
We recommend that you migrate to AWS SDK for JavaScript v3. For additional details and information on how to migrate, please refer to the announcement.

Class: AWS.MailManager

Inherits:
AWS.Service show all
Identifier:
mailmanager
API Version:
2023-10-17
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

AWS SES Mail Manager API contains operations and data types that comprise the Mail Manager feature of Amazon Simple Email Service.

Mail Manager is a set of Amazon SES email gateway features designed to help you strengthen your organization's email infrastructure, simplify email workflow management, and streamline email compliance control. To learn more, see the Mail Manager chapter in the Amazon SES Developer Guide.

Sending a Request Using MailManager

var mailmanager = new AWS.MailManager();
mailmanager.createAddonInstance(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the MailManager object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var mailmanager = new AWS.MailManager({apiVersion: '2023-10-17'});

You can also set the API version globally in AWS.config.apiVersions using the mailmanager service identifier:

AWS.config.apiVersions = {
  mailmanager: '2023-10-17',
  // other service API versions
};

var mailmanager = new AWS.MailManager();

Version:

  • 2023-10-17

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.MailManager(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a MailManager object

var mailmanager = new AWS.MailManager({apiVersion: '2023-10-17'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.MailManager.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.MailManager.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.MailManager.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createAddonInstance(params = {}, callback) ⇒ AWS.Request

Creates an Add On instance for the subscription indicated in the request. The resulting Amazon Resource Name (ARN) can be used in a conditional statement for a rule set or traffic policy.

Service Reference:

Examples:

Calling the createAddonInstance operation

var params = {
  AddonSubscriptionId: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
mailmanager.createAddonInstance(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AddonSubscriptionId — (String)

      The unique ID of a previously created subscription that an Add On instance is created for. You can only have one instance per subscription.

    • ClientToken — (String)

      A unique token that Amazon SES uses to recognize subsequent retries of the same request.

      If a token is not provided, the SDK will use a version 4 UUID.
    • Tags — (Array<map>)

      The tags used to organize, track, or control access for the resource. For example, { "tags": "key2":"value2" }.

      • Keyrequired — (String)

        The key of the key-value tag.

      • Valuerequired — (String)

        The value of the key-value tag.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AddonInstanceId — (String)

        The unique ID of the Add On instance created by this API.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createAddonSubscription(params = {}, callback) ⇒ AWS.Request

Creates a subscription for an Add On representing the acceptance of its terms of use and additional pricing. The subscription can then be used to create an instance for use in rule sets or traffic policies.

Service Reference:

Examples:

Calling the createAddonSubscription operation

var params = {
  AddonName: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
mailmanager.createAddonSubscription(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AddonName — (String)

      The name of the Add On to subscribe to. You can only have one subscription for each Add On name.

    • ClientToken — (String)

      A unique token that Amazon SES uses to recognize subsequent retries of the same request.

      If a token is not provided, the SDK will use a version 4 UUID.
    • Tags — (Array<map>)

      The tags used to organize, track, or control access for the resource. For example, { "tags": "key2":"value2" }.

      • Keyrequired — (String)

        The key of the key-value tag.

      • Valuerequired — (String)

        The value of the key-value tag.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AddonSubscriptionId — (String)

        The unique ID of the Add On subscription created by this API.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createArchive(params = {}, callback) ⇒ AWS.Request

Creates a new email archive resource for storing and retaining emails.

Service Reference:

Examples:

Calling the createArchive operation

var params = {
  ArchiveName: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  KmsKeyArn: 'STRING_VALUE',
  Retention: {
    RetentionPeriod: THREE_MONTHS | SIX_MONTHS | NINE_MONTHS | ONE_YEAR | EIGHTEEN_MONTHS | TWO_YEARS | THIRTY_MONTHS | THREE_YEARS | FOUR_YEARS | FIVE_YEARS | SIX_YEARS | SEVEN_YEARS | EIGHT_YEARS | NINE_YEARS | TEN_YEARS | PERMANENT
  },
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
mailmanager.createArchive(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ArchiveName — (String)

      A unique name for the new archive.

    • ClientToken — (String)

      A unique token Amazon SES uses to recognize retries of this request.

      If a token is not provided, the SDK will use a version 4 UUID.
    • KmsKeyArn — (String)

      The Amazon Resource Name (ARN) of the KMS key for encrypting emails in the archive.

    • Retention — (map)

      The period for retaining emails in the archive before automatic deletion.

      • RetentionPeriod — (String)

        The enum value sets the period for retaining emails in an archive.

        Possible values include:
        • "THREE_MONTHS"
        • "SIX_MONTHS"
        • "NINE_MONTHS"
        • "ONE_YEAR"
        • "EIGHTEEN_MONTHS"
        • "TWO_YEARS"
        • "THIRTY_MONTHS"
        • "THREE_YEARS"
        • "FOUR_YEARS"
        • "FIVE_YEARS"
        • "SIX_YEARS"
        • "SEVEN_YEARS"
        • "EIGHT_YEARS"
        • "NINE_YEARS"
        • "TEN_YEARS"
        • "PERMANENT"
    • Tags — (Array<map>)

      The tags used to organize, track, or control access for the resource. For example, { "tags": "key2":"value2" }.

      • Keyrequired — (String)

        The key of the key-value tag.

      • Valuerequired — (String)

        The value of the key-value tag.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ArchiveId — (String)

        The unique identifier for the newly created archive.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createIngressPoint(params = {}, callback) ⇒ AWS.Request

Provision a new ingress endpoint resource.

Service Reference:

Examples:

Calling the createIngressPoint operation

var params = {
  IngressPointName: 'STRING_VALUE', /* required */
  RuleSetId: 'STRING_VALUE', /* required */
  TrafficPolicyId: 'STRING_VALUE', /* required */
  Type: OPEN | AUTH, /* required */
  ClientToken: 'STRING_VALUE',
  IngressPointConfiguration: {
    SecretArn: 'STRING_VALUE',
    SmtpPassword: 'STRING_VALUE'
  },
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
mailmanager.createIngressPoint(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClientToken — (String)

      A unique token that Amazon SES uses to recognize subsequent retries of the same request.

      If a token is not provided, the SDK will use a version 4 UUID.
    • IngressPointConfiguration — (map)

      If you choose an Authenticated ingress endpoint, you must configure either an SMTP password or a secret ARN.

      • SecretArn — (String)

        The SecretsManager::Secret ARN of the ingress endpoint resource.

      • SmtpPassword — (String)

        The password of the ingress endpoint resource.

    • IngressPointName — (String)

      A user friendly name for an ingress endpoint resource.

    • RuleSetId — (String)

      The identifier of an existing rule set that you attach to an ingress endpoint resource.

    • Tags — (Array<map>)

      The tags used to organize, track, or control access for the resource. For example, { "tags": "key2":"value2" }.

      • Keyrequired — (String)

        The key of the key-value tag.

      • Valuerequired — (String)

        The value of the key-value tag.

    • TrafficPolicyId — (String)

      The identifier of an existing traffic policy that you attach to an ingress endpoint resource.

    • Type — (String)

      The type of the ingress endpoint to create.

      Possible values include:
      • "OPEN"
      • "AUTH"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • IngressPointId — (String)

        The unique identifier for a previously created ingress endpoint.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createRelay(params = {}, callback) ⇒ AWS.Request

Creates a relay resource which can be used in rules to relay incoming emails to defined relay destinations.

Service Reference:

Examples:

Calling the createRelay operation

var params = {
  Authentication: { /* required */
    NoAuthentication: {
    },
    SecretArn: 'STRING_VALUE'
  },
  RelayName: 'STRING_VALUE', /* required */
  ServerName: 'STRING_VALUE', /* required */
  ServerPort: 'NUMBER_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
mailmanager.createRelay(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Authentication — (map)

      Authentication for the relay destination server—specify the secretARN where the SMTP credentials are stored.

      • NoAuthentication — (map)

        Keep an empty structure if the relay destination server does not require SMTP credential authentication.

      • SecretArn — (String)

        The ARN of the secret created in secrets manager where the relay server's SMTP credentials are stored.

    • ClientToken — (String)

      A unique token that Amazon SES uses to recognize subsequent retries of the same request.

      If a token is not provided, the SDK will use a version 4 UUID.
    • RelayName — (String)

      The unique name of the relay resource.

    • ServerName — (String)

      The destination relay server address.

    • ServerPort — (Integer)

      The destination relay server port.

    • Tags — (Array<map>)

      The tags used to organize, track, or control access for the resource. For example, { "tags": "key2":"value2" }.

      • Keyrequired — (String)

        The key of the key-value tag.

      • Valuerequired — (String)

        The value of the key-value tag.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • RelayId — (String)

        A unique identifier of the created relay resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createRuleSet(params = {}, callback) ⇒ AWS.Request

Provision a new rule set.

Service Reference:

Examples:

Calling the createRuleSet operation

var params = {
  RuleSetName: 'STRING_VALUE', /* required */
  Rules: [ /* required */
    {
      Actions: [ /* required */
        {
          AddHeader: {
            HeaderName: 'STRING_VALUE', /* required */
            HeaderValue: 'STRING_VALUE' /* required */
          },
          Archive: {
            TargetArchive: 'STRING_VALUE', /* required */
            ActionFailurePolicy: CONTINUE | DROP
          },
          DeliverToMailbox: {
            MailboxArn: 'STRING_VALUE', /* required */
            RoleArn: 'STRING_VALUE', /* required */
            ActionFailurePolicy: CONTINUE | DROP
          },
          Drop: {
          },
          Relay: {
            Relay: 'STRING_VALUE', /* required */
            ActionFailurePolicy: CONTINUE | DROP,
            MailFrom: REPLACE | PRESERVE
          },
          ReplaceRecipient: {
            ReplaceWith: [
              'STRING_VALUE',
              /* more items */
            ]
          },
          Send: {
            RoleArn: 'STRING_VALUE', /* required */
            ActionFailurePolicy: CONTINUE | DROP
          },
          WriteToS3: {
            RoleArn: 'STRING_VALUE', /* required */
            S3Bucket: 'STRING_VALUE', /* required */
            ActionFailurePolicy: CONTINUE | DROP,
            S3Prefix: 'STRING_VALUE',
            S3SseKmsKeyId: 'STRING_VALUE'
          }
        },
        /* more items */
      ],
      Conditions: [
        {
          BooleanExpression: {
            Evaluate: { /* required */
              Attribute: READ_RECEIPT_REQUESTED | TLS | TLS_WRAPPED
            },
            Operator: IS_TRUE | IS_FALSE /* required */
          },
          DmarcExpression: {
            Operator: EQUALS | NOT_EQUALS, /* required */
            Values: [ /* required */
              NONE | QUARANTINE | REJECT,
              /* more items */
            ]
          },
          IpExpression: {
            Evaluate: { /* required */
              Attribute: SOURCE_IP
            },
            Operator: CIDR_MATCHES | NOT_CIDR_MATCHES, /* required */
            Values: [ /* required */
              'STRING_VALUE',
              /* more items */
            ]
          },
          NumberExpression: {
            Evaluate: { /* required */
              Attribute: MESSAGE_SIZE
            },
            Operator: EQUALS | NOT_EQUALS | LESS_THAN | GREATER_THAN | LESS_THAN_OR_EQUAL | GREATER_THAN_OR_EQUAL, /* required */
            Value: 'NUMBER_VALUE' /* required */
          },
          StringExpression: {
            Evaluate: { /* required */
              Attribute: MAIL_FROM | HELO | RECIPIENT | SENDER | FROM | SUBJECT | TO | CC
            },
            Operator: EQUALS | NOT_EQUALS | STARTS_WITH | ENDS_WITH | CONTAINS, /* required */
            Values: [ /* required */
              'STRING_VALUE',
              /* more items */
            ]
          },
          VerdictExpression: {
            Evaluate: { /* required */
              Analysis: {
                Analyzer: 'STRING_VALUE', /* required */
                ResultField: 'STRING_VALUE' /* required */
              },
              Attribute: SPF | DKIM
            },
            Operator: EQUALS | NOT_EQUALS, /* required */
            Values: [ /* required */
              PASS | FAIL | GRAY | PROCESSING_FAILED,
              /* more items */
            ]
          }
        },
        /* more items */
      ],
      Name: 'STRING_VALUE',
      Unless: [
        {
          BooleanExpression: {
            Evaluate: { /* required */
              Attribute: READ_RECEIPT_REQUESTED | TLS | TLS_WRAPPED
            },
            Operator: IS_TRUE | IS_FALSE /* required */
          },
          DmarcExpression: {
            Operator: EQUALS | NOT_EQUALS, /* required */
            Values: [ /* required */
              NONE | QUARANTINE | REJECT,
              /* more items */
            ]
          },
          IpExpression: {
            Evaluate: { /* required */
              Attribute: SOURCE_IP
            },
            Operator: CIDR_MATCHES | NOT_CIDR_MATCHES, /* required */
            Values: [ /* required */
              'STRING_VALUE',
              /* more items */
            ]
          },
          NumberExpression: {
            Evaluate: { /* required */
              Attribute: MESSAGE_SIZE
            },
            Operator: EQUALS | NOT_EQUALS | LESS_THAN | GREATER_THAN | LESS_THAN_OR_EQUAL | GREATER_THAN_OR_EQUAL, /* required */
            Value: 'NUMBER_VALUE' /* required */
          },
          StringExpression: {
            Evaluate: { /* required */
              Attribute: MAIL_FROM | HELO | RECIPIENT | SENDER | FROM | SUBJECT | TO | CC
            },
            Operator: EQUALS | NOT_EQUALS | STARTS_WITH | ENDS_WITH | CONTAINS, /* required */
            Values: [ /* required */
              'STRING_VALUE',
              /* more items */
            ]
          },
          VerdictExpression: {
            Evaluate: { /* required */
              Analysis: {
                Analyzer: 'STRING_VALUE', /* required */
                ResultField: 'STRING_VALUE' /* required */
              },
              Attribute: SPF | DKIM
            },
            Operator: EQUALS | NOT_EQUALS, /* required */
            Values: [ /* required */
              PASS | FAIL | GRAY | PROCESSING_FAILED,
              /* more items */
            ]
          }
        },
        /* more items */
      ]
    },
    /* more items */
  ],
  ClientToken: 'STRING_VALUE',
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
mailmanager.createRuleSet(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClientToken — (String)

      A unique token that Amazon SES uses to recognize subsequent retries of the same request.

      If a token is not provided, the SDK will use a version 4 UUID.
    • RuleSetName — (String)

      A user-friendly name for the rule set.

    • Rules — (Array<map>)

      Conditional rules that are evaluated for determining actions on email.

      • Actionsrequired — (Array<map>)

        The list of actions to execute when the conditions match the incoming email, and none of the "unless conditions" match.

        • AddHeader — (map)

          This action adds a header. This can be used to add arbitrary email headers.

          • HeaderNamerequired — (String)

            The name of the header to add to an email. The header must be prefixed with "X-". Headers are added regardless of whether the header name pre-existed in the email.

          • HeaderValuerequired — (String)

            The value of the header to add to the email.

        • Archive — (map)

          This action archives the email. This can be used to deliver an email to an archive.

          • ActionFailurePolicy — (String)

            A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the specified archive has been deleted.

            Possible values include:
            • "CONTINUE"
            • "DROP"
          • TargetArchiverequired — (String)

            The identifier of the archive to send the email to.

        • DeliverToMailbox — (map)

          This action delivers an email to a WorkMail mailbox.

          • ActionFailurePolicy — (String)

            A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the mailbox ARN is no longer valid.

            Possible values include:
            • "CONTINUE"
            • "DROP"
          • MailboxArnrequired — (String)

            The Amazon Resource Name (ARN) of a WorkMail organization to deliver the email to.

          • RoleArnrequired — (String)

            The Amazon Resource Name (ARN) of an IAM role to use to execute this action. The role must have access to the workmail:DeliverToMailbox API.

        • Drop — (map)

          This action terminates the evaluation of rules in the rule set.

        • Relay — (map)

          This action relays the email to another SMTP server.

          • ActionFailurePolicy — (String)

            A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the specified relay has been deleted.

            Possible values include:
            • "CONTINUE"
            • "DROP"
          • MailFrom — (String)

            This action specifies whether to preserve or replace original mail from address while relaying received emails to a destination server.

            Possible values include:
            • "REPLACE"
            • "PRESERVE"
          • Relayrequired — (String)

            The identifier of the relay resource to be used when relaying an email.

        • ReplaceRecipient — (map)

          The action replaces certain or all recipients with a different set of recipients.

          • ReplaceWith — (Array<String>)

            This action specifies the replacement recipient email addresses to insert.

        • Send — (map)

          This action sends the email to the internet.

          • ActionFailurePolicy — (String)

            A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the caller does not have the permissions to call the sendRawEmail API.

            Possible values include:
            • "CONTINUE"
            • "DROP"
          • RoleArnrequired — (String)

            The Amazon Resource Name (ARN) of the role to use for this action. This role must have access to the ses:SendRawEmail API.

        • WriteToS3 — (map)

          This action writes the MIME content of the email to an S3 bucket.

          • ActionFailurePolicy — (String)

            A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the specified the bucket has been deleted.

            Possible values include:
            • "CONTINUE"
            • "DROP"
          • RoleArnrequired — (String)

            The Amazon Resource Name (ARN) of the IAM Role to use while writing to S3. This role must have access to the s3:PutObject, kms:Encrypt, and kms:GenerateDataKey APIs for the given bucket.

          • S3Bucketrequired — (String)

            The bucket name of the S3 bucket to write to.

          • S3Prefix — (String)

            The S3 prefix to use for the write to the s3 bucket.

          • S3SseKmsKeyId — (String)

            The KMS Key ID to use to encrypt the message in S3.

      • Conditions — (Array<map>)

        The conditions of this rule. All conditions must match the email for the actions to be executed. An empty list of conditions means that all emails match, but are still subject to any "unless conditions"

        • BooleanExpression — (map)

          The condition applies to a boolean expression passed in this field.

          • Evaluaterequired — (map)

            The operand on which to perform a boolean condition operation.

            • Attribute — (String)

              The boolean type representing the allowed attribute types for an email.

              Possible values include:
              • "READ_RECEIPT_REQUESTED"
              • "TLS"
              • "TLS_WRAPPED"
          • Operatorrequired — (String)

            The matching operator for a boolean condition expression.

            Possible values include:
            • "IS_TRUE"
            • "IS_FALSE"
        • DmarcExpression — (map)

          The condition applies to a DMARC policy expression passed in this field.

          • Operatorrequired — (String)

            The operator to apply to the DMARC policy of the incoming email.

            Possible values include:
            • "EQUALS"
            • "NOT_EQUALS"
          • Valuesrequired — (Array<String>)

            The values to use for the given DMARC policy operator. For the operator EQUALS, if multiple values are given, they are evaluated as an OR. That is, if any of the given values match, the condition is deemed to match. For the operator NOT_EQUALS, if multiple values are given, they are evaluated as an AND. That is, only if the email's DMARC policy is not equal to any of the given values, then the condition is deemed to match.

        • IpExpression — (map)

          The condition applies to an IP address expression passed in this field.

          • Evaluaterequired — (map)

            The IP address to evaluate in this condition.

            • Attribute — (String)

              The attribute of the email to evaluate.

              Possible values include:
              • "SOURCE_IP"
          • Operatorrequired — (String)

            The operator to evaluate the IP address.

            Possible values include:
            • "CIDR_MATCHES"
            • "NOT_CIDR_MATCHES"
          • Valuesrequired — (Array<String>)

            The IP CIDR blocks in format "x.y.z.w/n" (eg 10.0.0.0/8) to match with the email's IP address. For the operator CIDR_MATCHES, if multiple values are given, they are evaluated as an OR. That is, if the IP address is contained within any of the given CIDR ranges, the condition is deemed to match. For NOT_CIDR_MATCHES, if multiple CIDR ranges are given, the condition is deemed to match if the IP address is not contained in any of the given CIDR ranges.

        • NumberExpression — (map)

          The condition applies to a number expression passed in this field.

          • Evaluaterequired — (map)

            The number to evaluate in a numeric condition expression.

            • Attribute — (String)

              An email attribute that is used as the number to evaluate.

              Possible values include:
              • "MESSAGE_SIZE"
          • Operatorrequired — (String)

            The operator for a numeric condition expression.

            Possible values include:
            • "EQUALS"
            • "NOT_EQUALS"
            • "LESS_THAN"
            • "GREATER_THAN"
            • "LESS_THAN_OR_EQUAL"
            • "GREATER_THAN_OR_EQUAL"
          • Valuerequired — (Float)

            The value to evaluate in a numeric condition expression.

        • StringExpression — (map)

          The condition applies to a string expression passed in this field.

          • Evaluaterequired — (map)

            The string to evaluate in a string condition expression.

            • Attribute — (String)

              The email attribute to evaluate in a string condition expression.

              Possible values include:
              • "MAIL_FROM"
              • "HELO"
              • "RECIPIENT"
              • "SENDER"
              • "FROM"
              • "SUBJECT"
              • "TO"
              • "CC"
          • Operatorrequired — (String)

            The matching operator for a string condition expression.

            Possible values include:
            • "EQUALS"
            • "NOT_EQUALS"
            • "STARTS_WITH"
            • "ENDS_WITH"
            • "CONTAINS"
          • Valuesrequired — (Array<String>)

            The string(s) to be evaluated in a string condition expression. For all operators, except for NOT_EQUALS, if multiple values are given, the values are processed as an OR. That is, if any of the values match the email's string using the given operator, the condition is deemed to match. However, for NOT_EQUALS, the condition is only deemed to match if none of the given strings match the email's string.

        • VerdictExpression — (map)

          The condition applies to a verdict expression passed in this field.

          • Evaluaterequired — (map)

            The verdict to evaluate in a verdict condition expression.

            • Analysis — (map)

              The Add On ARN and its returned value to evaluate in a verdict condition expression.

              • Analyzerrequired — (String)

                The Amazon Resource Name (ARN) of an Add On.

              • ResultFieldrequired — (String)

                The returned value from an Add On.

            • Attribute — (String)

              The email verdict attribute to evaluate in a string verdict expression.

              Possible values include:
              • "SPF"
              • "DKIM"
          • Operatorrequired — (String)

            The matching operator for a verdict condition expression.

            Possible values include:
            • "EQUALS"
            • "NOT_EQUALS"
          • Valuesrequired — (Array<String>)

            The values to match with the email's verdict using the given operator. For the EQUALS operator, if multiple values are given, the condition is deemed to match if any of the given verdicts match that of the email. For the NOT_EQUALS operator, if multiple values are given, the condition is deemed to match of none of the given verdicts match the verdict of the email.

      • Name — (String)

        The user-friendly name of the rule.

      • Unless — (Array<map>)

        The "unless conditions" of this rule. None of the conditions can match the email for the actions to be executed. If any of these conditions do match the email, then the actions are not executed.

        • BooleanExpression — (map)

          The condition applies to a boolean expression passed in this field.

          • Evaluaterequired — (map)

            The operand on which to perform a boolean condition operation.

            • Attribute — (String)

              The boolean type representing the allowed attribute types for an email.

              Possible values include:
              • "READ_RECEIPT_REQUESTED"
              • "TLS"
              • "TLS_WRAPPED"
          • Operatorrequired — (String)

            The matching operator for a boolean condition expression.

            Possible values include:
            • "IS_TRUE"
            • "IS_FALSE"
        • DmarcExpression — (map)

          The condition applies to a DMARC policy expression passed in this field.

          • Operatorrequired — (String)

            The operator to apply to the DMARC policy of the incoming email.

            Possible values include:
            • "EQUALS"
            • "NOT_EQUALS"
          • Valuesrequired — (Array<String>)

            The values to use for the given DMARC policy operator. For the operator EQUALS, if multiple values are given, they are evaluated as an OR. That is, if any of the given values match, the condition is deemed to match. For the operator NOT_EQUALS, if multiple values are given, they are evaluated as an AND. That is, only if the email's DMARC policy is not equal to any of the given values, then the condition is deemed to match.

        • IpExpression — (map)

          The condition applies to an IP address expression passed in this field.

          • Evaluaterequired — (map)

            The IP address to evaluate in this condition.

            • Attribute — (String)

              The attribute of the email to evaluate.

              Possible values include:
              • "SOURCE_IP"
          • Operatorrequired — (String)

            The operator to evaluate the IP address.

            Possible values include:
            • "CIDR_MATCHES"
            • "NOT_CIDR_MATCHES"
          • Valuesrequired — (Array<String>)

            The IP CIDR blocks in format "x.y.z.w/n" (eg 10.0.0.0/8) to match with the email's IP address. For the operator CIDR_MATCHES, if multiple values are given, they are evaluated as an OR. That is, if the IP address is contained within any of the given CIDR ranges, the condition is deemed to match. For NOT_CIDR_MATCHES, if multiple CIDR ranges are given, the condition is deemed to match if the IP address is not contained in any of the given CIDR ranges.

        • NumberExpression — (map)

          The condition applies to a number expression passed in this field.

          • Evaluaterequired — (map)

            The number to evaluate in a numeric condition expression.

            • Attribute — (String)

              An email attribute that is used as the number to evaluate.

              Possible values include:
              • "MESSAGE_SIZE"
          • Operatorrequired — (String)

            The operator for a numeric condition expression.

            Possible values include:
            • "EQUALS"
            • "NOT_EQUALS"
            • "LESS_THAN"
            • "GREATER_THAN"
            • "LESS_THAN_OR_EQUAL"
            • "GREATER_THAN_OR_EQUAL"
          • Valuerequired — (Float)

            The value to evaluate in a numeric condition expression.

        • StringExpression — (map)

          The condition applies to a string expression passed in this field.

          • Evaluaterequired — (map)

            The string to evaluate in a string condition expression.

            • Attribute — (String)

              The email attribute to evaluate in a string condition expression.

              Possible values include:
              • "MAIL_FROM"
              • "HELO"
              • "RECIPIENT"
              • "SENDER"
              • "FROM"
              • "SUBJECT"
              • "TO"
              • "CC"
          • Operatorrequired — (String)

            The matching operator for a string condition expression.

            Possible values include:
            • "EQUALS"
            • "NOT_EQUALS"
            • "STARTS_WITH"
            • "ENDS_WITH"
            • "CONTAINS"
          • Valuesrequired — (Array<String>)

            The string(s) to be evaluated in a string condition expression. For all operators, except for NOT_EQUALS, if multiple values are given, the values are processed as an OR. That is, if any of the values match the email's string using the given operator, the condition is deemed to match. However, for NOT_EQUALS, the condition is only deemed to match if none of the given strings match the email's string.

        • VerdictExpression — (map)

          The condition applies to a verdict expression passed in this field.

          • Evaluaterequired — (map)

            The verdict to evaluate in a verdict condition expression.

            • Analysis — (map)

              The Add On ARN and its returned value to evaluate in a verdict condition expression.

              • Analyzerrequired — (String)

                The Amazon Resource Name (ARN) of an Add On.

              • ResultFieldrequired — (String)

                The returned value from an Add On.

            • Attribute — (String)

              The email verdict attribute to evaluate in a string verdict expression.

              Possible values include:
              • "SPF"