[ aws . mailmanager ]
update-rule-set
Description
Update attributes of an already provisioned rule set.
See also: AWS API Documentation
Synopsis
update-rule-set
--rule-set-id <value>
[--rule-set-name <value>]
[--rules <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
Options
--rule-set-id (string)
--rule-set-name (string)
--rules (list)
A new set of rules to replace the current rules of the rule set—these rules will override all the rules of the rule set.
(structure)
A rule contains conditions, “unless conditions” and actions. For each envelope recipient of an email, if all conditions match and none of the “unless conditions” match, then all of the actions are executed sequentially. If no conditions are provided, the rule always applies and the actions are implicitly executed. If only “unless conditions” are provided, the rule applies if the email does not match the evaluation of the “unless conditions”.
Actions -> (list)
The list of actions to execute when the conditions match the incoming email, and none of the “unless conditions” match.
(tagged union structure)
The action for a rule to take. Only one of the contained actions can be set.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:AddHeader, Archive, DeliverToMailbox, DeliverToQBusiness, Drop, PublishToSns, Relay, ReplaceRecipient, Send, WriteToS3.AddHeader -> (structure)
This action adds a header. This can be used to add arbitrary email headers.
HeaderName -> (string)
HeaderValue -> (string)
Archive -> (structure)
This action archives the email. This can be used to deliver an email to an archive.
ActionFailurePolicy -> (string)
TargetArchive -> (string)
DeliverToMailbox -> (structure)
This action delivers an email to a WorkMail mailbox.
ActionFailurePolicy -> (string)
MailboxArn -> (string)
RoleArn -> (string)
DeliverToQBusiness -> (structure)
This action delivers an email to an Amazon Q Business application for ingestion into its knowledge base.
ActionFailurePolicy -> (string)
qbusiness:BatchPutDocument API.ApplicationId -> (string)
IndexId -> (string)
RoleArn -> (string)
qbusiness:BatchPutDocument API for the given application and index.Drop -> (structure)
PublishToSns -> (structure)
This action publishes the email content to an Amazon SNS topic.
ActionFailurePolicy -> (string)
sns:Publish API.Encoding -> (string)
UTF-8 . Use BASE64 if you need to preserve all special characters, especially when the original message uses a different encoding format.PayloadType -> (string)
CONTENT attempts to publish the full email content with 20KB of headers content. HEADERS extracts up to 100KB of header content to include in the notification, email content will not be included to the notification. The default value is CONTENT .RoleArn -> (string)
sns:Publish API for the given topic.TopicArn -> (string)
Relay -> (structure)
This action relays the email to another SMTP server.
ActionFailurePolicy -> (string)
MailFrom -> (string)
Relay -> (string)
ReplaceRecipient -> (structure)
The action replaces certain or all recipients with a different set of recipients.
ReplaceWith -> (list)
This action specifies the replacement recipient email addresses to insert.
(string)
Send -> (structure)
This action sends the email to the internet.
ActionFailurePolicy -> (string)
RoleArn -> (string)
WriteToS3 -> (structure)
This action writes the MIME content of the email to an S3 bucket.
ActionFailurePolicy -> (string)
RoleArn -> (string)
S3Bucket -> (string)
S3Prefix -> (string)
S3SseKmsKeyId -> (string)
Conditions -> (list)
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”
(tagged union structure)
The conditional expression used to evaluate an email for determining if a rule action should be taken.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:BooleanExpression, DmarcExpression, IpExpression, NumberExpression, StringExpression, VerdictExpression.BooleanExpression -> (structure)
The condition applies to a boolean expression passed in this field.
Evaluate -> (tagged union structure)
The operand on which to perform a boolean condition operation.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:Analysis, Attribute, IsInAddressList.Analysis -> (structure)
The Add On ARN and its returned value to evaluate in a boolean condition expression.
Analyzer -> (string)
ResultField -> (string)
Attribute -> (string)
IsInAddressList -> (structure)
The structure representing the address lists and address list attribute that will be used in evaluation of boolean expression.
AddressLists -> (list)
The address lists that will be used for evaluation.
(string)
Attribute -> (string)
Operator -> (string)
DmarcExpression -> (structure)
The condition applies to a DMARC policy expression passed in this field.
Operator -> (string)
Values -> (list)
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.
(string)
IpExpression -> (structure)
The condition applies to an IP address expression passed in this field.
Evaluate -> (tagged union structure)
The IP address to evaluate in this condition.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:Attribute.Attribute -> (string)
Operator -> (string)
Values -> (list)
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.
(string)
NumberExpression -> (structure)
The condition applies to a number expression passed in this field.
Evaluate -> (tagged union structure)
The number to evaluate in a numeric condition expression.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:Attribute.Attribute -> (string)
Operator -> (string)
Value -> (double)
StringExpression -> (structure)
The condition applies to a string expression passed in this field.
Evaluate -> (tagged union structure)
The string to evaluate in a string condition expression.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:Analysis, Attribute, MimeHeaderAttribute.Analysis -> (structure)
The Add On ARN and its returned value to evaluate in a string condition expression.
Analyzer -> (string)
ResultField -> (string)
Attribute -> (string)
MimeHeaderAttribute -> (string)
Operator -> (string)
Values -> (list)
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.
(string)
VerdictExpression -> (structure)
The condition applies to a verdict expression passed in this field.
Evaluate -> (tagged union structure)
The verdict to evaluate in a verdict condition expression.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:Analysis, Attribute.Analysis -> (structure)
The Add On ARN and its returned value to evaluate in a verdict condition expression.
Analyzer -> (string)
ResultField -> (string)
Attribute -> (string)
Operator -> (string)
Values -> (list)
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.
(string)
Name -> (string)
Unless -> (list)
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.
(tagged union structure)
The conditional expression used to evaluate an email for determining if a rule action should be taken.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:BooleanExpression, DmarcExpression, IpExpression, NumberExpression, StringExpression, VerdictExpression.BooleanExpression -> (structure)
The condition applies to a boolean expression passed in this field.
Evaluate -> (tagged union structure)
The operand on which to perform a boolean condition operation.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:Analysis, Attribute, IsInAddressList.Analysis -> (structure)
The Add On ARN and its returned value to evaluate in a boolean condition expression.
Analyzer -> (string)
ResultField -> (string)
Attribute -> (string)
IsInAddressList -> (structure)
The structure representing the address lists and address list attribute that will be used in evaluation of boolean expression.
AddressLists -> (list)
The address lists that will be used for evaluation.
(string)
Attribute -> (string)
Operator -> (string)
DmarcExpression -> (structure)
The condition applies to a DMARC policy expression passed in this field.
Operator -> (string)
Values -> (list)
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.
(string)
IpExpression -> (structure)
The condition applies to an IP address expression passed in this field.
Evaluate -> (tagged union structure)
The IP address to evaluate in this condition.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:Attribute.Attribute -> (string)
Operator -> (string)
Values -> (list)
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.
(string)
NumberExpression -> (structure)
The condition applies to a number expression passed in this field.
Evaluate -> (tagged union structure)
The number to evaluate in a numeric condition expression.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:Attribute.Attribute -> (string)
Operator -> (string)
Value -> (double)
StringExpression -> (structure)
The condition applies to a string expression passed in this field.
Evaluate -> (tagged union structure)
The string to evaluate in a string condition expression.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:Analysis, Attribute, MimeHeaderAttribute.Analysis -> (structure)
The Add On ARN and its returned value to evaluate in a string condition expression.
Analyzer -> (string)
ResultField -> (string)
Attribute -> (string)
MimeHeaderAttribute -> (string)
Operator -> (string)
Values -> (list)
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.
(string)
VerdictExpression -> (structure)
The condition applies to a verdict expression passed in this field.
Evaluate -> (tagged union structure)
The verdict to evaluate in a verdict condition expression.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:Analysis, Attribute.Analysis -> (structure)
The Add On ARN and its returned value to evaluate in a verdict condition expression.
Analyzer -> (string)
ResultField -> (string)
Attribute -> (string)
Operator -> (string)
Values -> (list)
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.
(string)
JSON Syntax:
[
{
"Actions": [
{
"AddHeader": {
"HeaderName": "string",
"HeaderValue": "string"
},
"Archive": {
"ActionFailurePolicy": "CONTINUE"|"DROP",
"TargetArchive": "string"
},
"DeliverToMailbox": {
"ActionFailurePolicy": "CONTINUE"|"DROP",
"MailboxArn": "string",
"RoleArn": "string"
},
"DeliverToQBusiness": {
"ActionFailurePolicy": "CONTINUE"|"DROP",
"ApplicationId": "string",
"IndexId": "string",
"RoleArn": "string"
},
"Drop": {
},
"PublishToSns": {
"ActionFailurePolicy": "CONTINUE"|"DROP",
"Encoding": "UTF-8"|"BASE64",
"PayloadType": "HEADERS"|"CONTENT",
"RoleArn": "string",
"TopicArn": "string"
},
"Relay": {
"ActionFailurePolicy": "CONTINUE"|"DROP",
"MailFrom": "REPLACE"|"PRESERVE",
"Relay": "string"
},
"ReplaceRecipient": {
"ReplaceWith": ["string", ...]
},
"Send": {
"ActionFailurePolicy": "CONTINUE"|"DROP",
"RoleArn": "string"
},
"WriteToS3": {
"ActionFailurePolicy": "CONTINUE"|"DROP",
"RoleArn": "string",
"S3Bucket": "string",
"S3Prefix": "string",
"S3SseKmsKeyId": "string"
}
}
...
],
"Conditions": [
{
"BooleanExpression": {
"Evaluate": {
"Analysis": {
"Analyzer": "string",
"ResultField": "string"
},
"Attribute": "READ_RECEIPT_REQUESTED"|"TLS"|"TLS_WRAPPED",
"IsInAddressList": {
"AddressLists": ["string", ...],
"Attribute": "RECIPIENT"|"MAIL_FROM"|"SENDER"|"FROM"|"TO"|"CC"
}
},
"Operator": "IS_TRUE"|"IS_FALSE"
},
"DmarcExpression": {
"Operator": "EQUALS"|"NOT_EQUALS",
"Values": ["NONE"|"QUARANTINE"|"REJECT", ...]
},
"IpExpression": {
"Evaluate": {
"Attribute": "SOURCE_IP"
},
"Operator": "CIDR_MATCHES"|"NOT_CIDR_MATCHES",
"Values": ["string", ...]
},
"NumberExpression": {
"Evaluate": {
"Attribute": "MESSAGE_SIZE"
},
"Operator": "EQUALS"|"NOT_EQUALS"|"LESS_THAN"|"GREATER_THAN"|"LESS_THAN_OR_EQUAL"|"GREATER_THAN_OR_EQUAL",
"Value": double
},
"StringExpression": {
"Evaluate": {
"Analysis": {
"Analyzer": "string",
"ResultField": "string"
},
"Attribute": "MAIL_FROM"|"HELO"|"RECIPIENT"|"SENDER"|"FROM"|"SUBJECT"|"TO"|"CC",
"MimeHeaderAttribute": "string"
},
"Operator": "EQUALS"|"NOT_EQUALS"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS",
"Values": ["string", ...]
},
"VerdictExpression": {
"Evaluate": {
"Analysis": {
"Analyzer": "string",
"ResultField": "string"
},
"Attribute": "SPF"|"DKIM"
},
"Operator": "EQUALS"|"NOT_EQUALS",
"Values": ["PASS"|"FAIL"|"GRAY"|"PROCESSING_FAILED", ...]
}
}
...
],
"Name": "string",
"Unless": [
{
"BooleanExpression": {
"Evaluate": {
"Analysis": {
"Analyzer": "string",
"ResultField": "string"
},
"Attribute": "READ_RECEIPT_REQUESTED"|"TLS"|"TLS_WRAPPED",
"IsInAddressList": {
"AddressLists": ["string", ...],
"Attribute": "RECIPIENT"|"MAIL_FROM"|"SENDER"|"FROM"|"TO"|"CC"
}
},
"Operator": "IS_TRUE"|"IS_FALSE"
},
"DmarcExpression": {
"Operator": "EQUALS"|"NOT_EQUALS",
"Values": ["NONE"|"QUARANTINE"|"REJECT", ...]
},
"IpExpression": {
"Evaluate": {
"Attribute": "SOURCE_IP"
},
"Operator": "CIDR_MATCHES"|"NOT_CIDR_MATCHES",
"Values": ["string", ...]
},
"NumberExpression": {
"Evaluate": {
"Attribute": "MESSAGE_SIZE"
},
"Operator": "EQUALS"|"NOT_EQUALS"|"LESS_THAN"|"GREATER_THAN"|"LESS_THAN_OR_EQUAL"|"GREATER_THAN_OR_EQUAL",
"Value": double
},
"StringExpression": {
"Evaluate": {
"Analysis": {
"Analyzer": "string",
"ResultField": "string"
},
"Attribute": "MAIL_FROM"|"HELO"|"RECIPIENT"|"SENDER"|"FROM"|"SUBJECT"|"TO"|"CC",
"MimeHeaderAttribute": "string"
},
"Operator": "EQUALS"|"NOT_EQUALS"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS",
"Values": ["string", ...]
},
"VerdictExpression": {
"Evaluate": {
"Analysis": {
"Analyzer": "string",
"ResultField": "string"
},
"Attribute": "SPF"|"DKIM"
},
"Operator": "EQUALS"|"NOT_EQUALS",
"Values": ["PASS"|"FAIL"|"GRAY"|"PROCESSING_FAILED", ...]
}
}
...
]
}
...
]
--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.
--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.
Global Options
--debug (boolean)
Turn on debug logging.
--endpoint-url (string)
Override command’s default URL with the given URL.
--no-verify-ssl (boolean)
By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.
--no-paginate (boolean)
Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.
--output (string)
The formatting style for command output.
- json
- text
- table
- yaml
- yaml-stream
--query (string)
A JMESPath query to use in filtering the response data.
--profile (string)
Use a specific profile from your credential file.
--region (string)
The region to use. Overrides config/env settings.
--version (string)
Display the version of this tool.
--color (string)
Turn on/off color output.
- on
- off
- auto
--no-sign-request (boolean)
Do not sign requests. Credentials will not be loaded if this argument is provided.
--ca-bundle (string)
The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.
--cli-read-timeout (int)
The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.
--cli-connect-timeout (int)
The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.
--cli-binary-format (string)
The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob fileb:// will always be treated as binary and use the file contents directly regardless of the cli-binary-format setting. When using file:// the file contents will need to properly formatted for the configured cli-binary-format.
- base64
- raw-in-base64-out
--no-cli-pager (boolean)
Disable cli pager for output.
--cli-auto-prompt (boolean)
Automatically prompt for CLI input parameters.
--no-cli-auto-prompt (boolean)
Disable automatically prompt for CLI input parameters.
Output
None
© Copyright 2025, Amazon Web Services. Created using Sphinx.