- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetRuleSetCommand
Fetch attributes of a rule set.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { MailManagerClient, GetRuleSetCommand } from "@aws-sdk/client-mailmanager"; // ES Modules import
// const { MailManagerClient, GetRuleSetCommand } = require("@aws-sdk/client-mailmanager"); // CommonJS import
const client = new MailManagerClient(config);
const input = { // GetRuleSetRequest
RuleSetId: "STRING_VALUE", // required
};
const command = new GetRuleSetCommand(input);
const response = await client.send(command);
// { // GetRuleSetResponse
// RuleSetId: "STRING_VALUE", // required
// RuleSetArn: "STRING_VALUE", // required
// RuleSetName: "STRING_VALUE", // required
// CreatedDate: new Date("TIMESTAMP"), // required
// LastModificationDate: new Date("TIMESTAMP"), // required
// Rules: [ // Rules // required
// { // Rule
// Name: "STRING_VALUE",
// Conditions: [ // RuleConditions
// { // RuleCondition Union: only one key present
// BooleanExpression: { // RuleBooleanExpression
// Evaluate: { // RuleBooleanToEvaluate Union: only one key present
// Attribute: "READ_RECEIPT_REQUESTED" || "TLS" || "TLS_WRAPPED",
// Analysis: { // Analysis
// Analyzer: "STRING_VALUE", // required
// ResultField: "STRING_VALUE", // required
// },
// IsInAddressList: { // RuleIsInAddressList
// Attribute: "RECIPIENT" || "MAIL_FROM" || "SENDER" || "FROM" || "TO" || "CC", // required
// AddressLists: [ // RuleAddressListArnList // required
// "STRING_VALUE",
// ],
// },
// },
// Operator: "IS_TRUE" || "IS_FALSE", // required
// },
// StringExpression: { // RuleStringExpression
// Evaluate: { // RuleStringToEvaluate Union: only one key present
// Attribute: "MAIL_FROM" || "HELO" || "RECIPIENT" || "SENDER" || "FROM" || "SUBJECT" || "TO" || "CC",
// MimeHeaderAttribute: "STRING_VALUE",
// Analysis: {
// Analyzer: "STRING_VALUE", // required
// ResultField: "STRING_VALUE", // required
// },
// },
// Operator: "EQUALS" || "NOT_EQUALS" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS", // required
// Values: [ // RuleStringList // required
// "STRING_VALUE",
// ],
// },
// NumberExpression: { // RuleNumberExpression
// Evaluate: { // RuleNumberToEvaluate Union: only one key present
// Attribute: "MESSAGE_SIZE",
// },
// Operator: "EQUALS" || "NOT_EQUALS" || "LESS_THAN" || "GREATER_THAN" || "LESS_THAN_OR_EQUAL" || "GREATER_THAN_OR_EQUAL", // required
// Value: Number("double"), // required
// },
// IpExpression: { // RuleIpExpression
// Evaluate: { // RuleIpToEvaluate Union: only one key present
// Attribute: "SOURCE_IP",
// },
// Operator: "CIDR_MATCHES" || "NOT_CIDR_MATCHES", // required
// Values: [ // RuleIpValueList // required
// "STRING_VALUE",
// ],
// },
// VerdictExpression: { // RuleVerdictExpression
// Evaluate: { // RuleVerdictToEvaluate Union: only one key present
// Attribute: "SPF" || "DKIM",
// Analysis: {
// Analyzer: "STRING_VALUE", // required
// ResultField: "STRING_VALUE", // required
// },
// },
// Operator: "EQUALS" || "NOT_EQUALS", // required
// Values: [ // RuleVerdictValueList // required
// "PASS" || "FAIL" || "GRAY" || "PROCESSING_FAILED",
// ],
// },
// DmarcExpression: { // RuleDmarcExpression
// Operator: "EQUALS" || "NOT_EQUALS", // required
// Values: [ // RuleDmarcValueList // required
// "NONE" || "QUARANTINE" || "REJECT",
// ],
// },
// },
// ],
// Unless: [
// {// Union: only one key present
// BooleanExpression: {
// Evaluate: {// Union: only one key present
// Attribute: "READ_RECEIPT_REQUESTED" || "TLS" || "TLS_WRAPPED",
// Analysis: {
// Analyzer: "STRING_VALUE", // required
// ResultField: "STRING_VALUE", // required
// },
// IsInAddressList: {
// Attribute: "RECIPIENT" || "MAIL_FROM" || "SENDER" || "FROM" || "TO" || "CC", // required
// AddressLists: [ // required
// "STRING_VALUE",
// ],
// },
// },
// Operator: "IS_TRUE" || "IS_FALSE", // required
// },
// StringExpression: {
// Evaluate: {// Union: only one key present
// Attribute: "MAIL_FROM" || "HELO" || "RECIPIENT" || "SENDER" || "FROM" || "SUBJECT" || "TO" || "CC",
// MimeHeaderAttribute: "STRING_VALUE",
// Analysis: {
// Analyzer: "STRING_VALUE", // required
// ResultField: "STRING_VALUE", // required
// },
// },
// Operator: "EQUALS" || "NOT_EQUALS" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS", // required
// Values: [ // required
// "STRING_VALUE",
// ],
// },
// NumberExpression: {
// Evaluate: {// Union: only one key present
// Attribute: "MESSAGE_SIZE",
// },
// Operator: "EQUALS" || "NOT_EQUALS" || "LESS_THAN" || "GREATER_THAN" || "LESS_THAN_OR_EQUAL" || "GREATER_THAN_OR_EQUAL", // required
// Value: Number("double"), // required
// },
// IpExpression: {
// Evaluate: {// Union: only one key present
// Attribute: "SOURCE_IP",
// },
// Operator: "CIDR_MATCHES" || "NOT_CIDR_MATCHES", // required
// Values: [ // required
// "STRING_VALUE",
// ],
// },
// VerdictExpression: {
// Evaluate: {// Union: only one key present
// Attribute: "SPF" || "DKIM",
// Analysis: "<Analysis>",
// },
// Operator: "EQUALS" || "NOT_EQUALS", // required
// Values: [ // required
// "PASS" || "FAIL" || "GRAY" || "PROCESSING_FAILED",
// ],
// },
// DmarcExpression: {
// Operator: "EQUALS" || "NOT_EQUALS", // required
// Values: [ // required
// "NONE" || "QUARANTINE" || "REJECT",
// ],
// },
// },
// ],
// Actions: [ // RuleActions // required
// { // RuleAction Union: only one key present
// Drop: {},
// Relay: { // RelayAction
// ActionFailurePolicy: "CONTINUE" || "DROP",
// Relay: "STRING_VALUE", // required
// MailFrom: "REPLACE" || "PRESERVE",
// },
// Archive: { // ArchiveAction
// ActionFailurePolicy: "CONTINUE" || "DROP",
// TargetArchive: "STRING_VALUE", // required
// },
// WriteToS3: { // S3Action
// ActionFailurePolicy: "CONTINUE" || "DROP",
// RoleArn: "STRING_VALUE", // required
// S3Bucket: "STRING_VALUE", // required
// S3Prefix: "STRING_VALUE",
// S3SseKmsKeyId: "STRING_VALUE",
// },
// Send: { // SendAction
// ActionFailurePolicy: "CONTINUE" || "DROP",
// RoleArn: "STRING_VALUE", // required
// },
// AddHeader: { // AddHeaderAction
// HeaderName: "STRING_VALUE", // required
// HeaderValue: "STRING_VALUE", // required
// },
// ReplaceRecipient: { // ReplaceRecipientAction
// ReplaceWith: [ // Recipients
// "STRING_VALUE",
// ],
// },
// DeliverToMailbox: { // DeliverToMailboxAction
// ActionFailurePolicy: "CONTINUE" || "DROP",
// MailboxArn: "STRING_VALUE", // required
// RoleArn: "STRING_VALUE", // required
// },
// DeliverToQBusiness: { // DeliverToQBusinessAction
// ActionFailurePolicy: "CONTINUE" || "DROP",
// ApplicationId: "STRING_VALUE", // required
// IndexId: "STRING_VALUE", // required
// RoleArn: "STRING_VALUE", // required
// },
// },
// ],
// },
// ],
// };
GetRuleSetCommand Input
See GetRuleSetCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
RuleSetId Required | string | undefined | The identifier of an existing rule set to be retrieved. |
GetRuleSetCommand Output
See GetRuleSetCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
CreatedDate Required | Date | undefined | The date of when then rule set was created. |
LastModificationDate Required | Date | undefined | The date of when the rule set was last modified. |
RuleSetArn Required | string | undefined | The Amazon Resource Name (ARN) of the rule set resource. |
RuleSetId Required | string | undefined | The identifier of the rule set resource. |
RuleSetName Required | string | undefined | A user-friendly name for the rule set resource. |
Rules Required | Rule[] | undefined | The rules contained in the rule set. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ResourceNotFoundException | client | Occurs when a requested resource is not found. |
ValidationException | client | The request validation has failed. For details, see the accompanying error message. |
MailManagerServiceException | Base exception class for all service exceptions from MailManager service. |