Skip to content

Commit 900a39e

Browse files
author
awstools
committed
feat(client-mailmanager): Introduce a new RuleSet condition evaluation, where customers can set up a StringExpression with a MimeHeader condition. This condition will perform the necessary validation based on the X-header provided by customers.
1 parent 8c9372b commit 900a39e

File tree

9 files changed

+69
-29
lines changed

9 files changed

+69
-29
lines changed

clients/client-mailmanager/README.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66

77
AWS SDK for JavaScript MailManager Client for Node.js, Browser and React Native.
88

9-
<fullname>AWS SES Mail Manager API</fullname>
9+
<fullname>Amazon SES Mail Manager API</fullname>
1010

11-
<p>
12-
<a href="http://aws.amazon.com/ses">AWS SES Mail Manager API</a> contains operations and data types
13-
that comprise the Mail Manager feature of Amazon Simple Email Service.</p>
11+
<p>The Amazon SES Mail Manager API contains operations and data types
12+
that comprise the Mail Manager feature of <a href="http://aws.amazon.com/ses">Amazon Simple Email Service (SES)</a>.</p>
1413
<p>Mail Manager is a set of Amazon SES email gateway features designed to help you strengthen
1514
your organization's email infrastructure, simplify email workflow management, and
16-
streamline email compliance control. To learn more, see the <a href="https://docs.aws.amazon.com/ses/latest/dg/eb.html">Mail Manager chapter</a> in the Amazon SES Developer
17-
Guide.</p>
15+
streamline email compliance control. To learn more, see the <a href="https://docs.aws.amazon.com/ses/latest/dg/eb.html">Mail Manager chapter</a> in the <i>Amazon SES Developer
16+
Guide</i>.</p>
1817

1918
## Installing
2019

clients/client-mailmanager/src/MailManager.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -961,14 +961,13 @@ export interface MailManager {
961961
}
962962

963963
/**
964-
* <fullname>AWS SES Mail Manager API</fullname>
965-
* <p>
966-
* <a href="http://aws.amazon.com/ses">AWS SES Mail Manager API</a> contains operations and data types
967-
* that comprise the Mail Manager feature of Amazon Simple Email Service.</p>
964+
* <fullname>Amazon SES Mail Manager API</fullname>
965+
* <p>The Amazon SES Mail Manager API contains operations and data types
966+
* that comprise the Mail Manager feature of <a href="http://aws.amazon.com/ses">Amazon Simple Email Service (SES)</a>.</p>
968967
* <p>Mail Manager is a set of Amazon SES email gateway features designed to help you strengthen
969968
* your organization's email infrastructure, simplify email workflow management, and
970-
* streamline email compliance control. To learn more, see the <a href="https://docs.aws.amazon.com/ses/latest/dg/eb.html">Mail Manager chapter</a> in the Amazon SES Developer
971-
* Guide.</p>
969+
* streamline email compliance control. To learn more, see the <a href="https://docs.aws.amazon.com/ses/latest/dg/eb.html">Mail Manager chapter</a> in the <i>Amazon SES Developer
970+
* Guide</i>.</p>
972971
* @public
973972
*/
974973
export class MailManager extends MailManagerClient implements MailManager {}

clients/client-mailmanager/src/MailManagerClient.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -429,14 +429,13 @@ export type MailManagerClientResolvedConfigType = __SmithyResolvedConfiguration<
429429
export interface MailManagerClientResolvedConfig extends MailManagerClientResolvedConfigType {}
430430

431431
/**
432-
* <fullname>AWS SES Mail Manager API</fullname>
433-
* <p>
434-
* <a href="http://aws.amazon.com/ses">AWS SES Mail Manager API</a> contains operations and data types
435-
* that comprise the Mail Manager feature of Amazon Simple Email Service.</p>
432+
* <fullname>Amazon SES Mail Manager API</fullname>
433+
* <p>The Amazon SES Mail Manager API contains operations and data types
434+
* that comprise the Mail Manager feature of <a href="http://aws.amazon.com/ses">Amazon Simple Email Service (SES)</a>.</p>
436435
* <p>Mail Manager is a set of Amazon SES email gateway features designed to help you strengthen
437436
* your organization's email infrastructure, simplify email workflow management, and
438-
* streamline email compliance control. To learn more, see the <a href="https://docs.aws.amazon.com/ses/latest/dg/eb.html">Mail Manager chapter</a> in the Amazon SES Developer
439-
* Guide.</p>
437+
* streamline email compliance control. To learn more, see the <a href="https://docs.aws.amazon.com/ses/latest/dg/eb.html">Mail Manager chapter</a> in the <i>Amazon SES Developer
438+
* Guide</i>.</p>
440439
* @public
441440
*/
442441
export class MailManagerClient extends __Client<

clients/client-mailmanager/src/commands/CreateRuleSetCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export interface CreateRuleSetCommandOutput extends CreateRuleSetResponse, __Met
5656
* StringExpression: { // RuleStringExpression
5757
* Evaluate: { // RuleStringToEvaluate Union: only one key present
5858
* Attribute: "MAIL_FROM" || "HELO" || "RECIPIENT" || "SENDER" || "FROM" || "SUBJECT" || "TO" || "CC",
59+
* MimeHeaderAttribute: "STRING_VALUE",
5960
* },
6061
* Operator: "EQUALS" || "NOT_EQUALS" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS", // required
6162
* Values: [ // RuleStringList // required
@@ -110,6 +111,7 @@ export interface CreateRuleSetCommandOutput extends CreateRuleSetResponse, __Met
110111
* StringExpression: {
111112
* Evaluate: {// Union: only one key present
112113
* Attribute: "MAIL_FROM" || "HELO" || "RECIPIENT" || "SENDER" || "FROM" || "SUBJECT" || "TO" || "CC",
114+
* MimeHeaderAttribute: "STRING_VALUE",
113115
* },
114116
* Operator: "EQUALS" || "NOT_EQUALS" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS", // required
115117
* Values: [ // required

clients/client-mailmanager/src/commands/GetRuleSetCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export interface GetRuleSetCommandOutput extends GetRuleSetResponse, __MetadataB
6060
* // StringExpression: { // RuleStringExpression
6161
* // Evaluate: { // RuleStringToEvaluate Union: only one key present
6262
* // Attribute: "MAIL_FROM" || "HELO" || "RECIPIENT" || "SENDER" || "FROM" || "SUBJECT" || "TO" || "CC",
63+
* // MimeHeaderAttribute: "STRING_VALUE",
6364
* // },
6465
* // Operator: "EQUALS" || "NOT_EQUALS" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS", // required
6566
* // Values: [ // RuleStringList // required
@@ -114,6 +115,7 @@ export interface GetRuleSetCommandOutput extends GetRuleSetResponse, __MetadataB
114115
* // StringExpression: {
115116
* // Evaluate: {// Union: only one key present
116117
* // Attribute: "MAIL_FROM" || "HELO" || "RECIPIENT" || "SENDER" || "FROM" || "SUBJECT" || "TO" || "CC",
118+
* // MimeHeaderAttribute: "STRING_VALUE",
117119
* // },
118120
* // Operator: "EQUALS" || "NOT_EQUALS" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS", // required
119121
* // Values: [ // required

clients/client-mailmanager/src/commands/UpdateRuleSetCommand.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export interface UpdateRuleSetCommandInput extends UpdateRuleSetRequest {}
3232
export interface UpdateRuleSetCommandOutput extends UpdateRuleSetResponse, __MetadataBearer {}
3333

3434
/**
35-
* <p>&gt;Update attributes of an already provisioned rule set.</p>
35+
* <p>Update attributes of an already provisioned rule set.</p>
3636
* @example
3737
* Use a bare-bones client and the command you need to make an API call.
3838
* ```javascript
@@ -56,6 +56,7 @@ export interface UpdateRuleSetCommandOutput extends UpdateRuleSetResponse, __Met
5656
* StringExpression: { // RuleStringExpression
5757
* Evaluate: { // RuleStringToEvaluate Union: only one key present
5858
* Attribute: "MAIL_FROM" || "HELO" || "RECIPIENT" || "SENDER" || "FROM" || "SUBJECT" || "TO" || "CC",
59+
* MimeHeaderAttribute: "STRING_VALUE",
5960
* },
6061
* Operator: "EQUALS" || "NOT_EQUALS" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS", // required
6162
* Values: [ // RuleStringList // required
@@ -110,6 +111,7 @@ export interface UpdateRuleSetCommandOutput extends UpdateRuleSetResponse, __Met
110111
* StringExpression: {
111112
* Evaluate: {// Union: only one key present
112113
* Attribute: "MAIL_FROM" || "HELO" || "RECIPIENT" || "SENDER" || "FROM" || "SUBJECT" || "TO" || "CC",
114+
* MimeHeaderAttribute: "STRING_VALUE",
113115
* },
114116
* Operator: "EQUALS" || "NOT_EQUALS" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS", // required
115117
* Values: [ // required

clients/client-mailmanager/src/index.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
// smithy-typescript generated code
22
/* eslint-disable */
33
/**
4-
* <fullname>AWS SES Mail Manager API</fullname>
5-
* <p>
6-
* <a href="http://aws.amazon.com/ses">AWS SES Mail Manager API</a> contains operations and data types
7-
* that comprise the Mail Manager feature of Amazon Simple Email Service.</p>
4+
* <fullname>Amazon SES Mail Manager API</fullname>
5+
* <p>The Amazon SES Mail Manager API contains operations and data types
6+
* that comprise the Mail Manager feature of <a href="http://aws.amazon.com/ses">Amazon Simple Email Service (SES)</a>.</p>
87
* <p>Mail Manager is a set of Amazon SES email gateway features designed to help you strengthen
98
* your organization's email infrastructure, simplify email workflow management, and
10-
* streamline email compliance control. To learn more, see the <a href="https://docs.aws.amazon.com/ses/latest/dg/eb.html">Mail Manager chapter</a> in the Amazon SES Developer
11-
* Guide.</p>
9+
* streamline email compliance control. To learn more, see the <a href="https://docs.aws.amazon.com/ses/latest/dg/eb.html">Mail Manager chapter</a> in the <i>Amazon SES Developer
10+
* Guide</i>.</p>
1211
*
1312
* @packageDocumentation
1413
*/

clients/client-mailmanager/src/models/models_0.ts

+18-1
Original file line numberDiff line numberDiff line change
@@ -2083,7 +2083,10 @@ export type RuleStringEmailAttribute = (typeof RuleStringEmailAttribute)[keyof t
20832083
* <p>The string to evaluate in a string condition expression.</p>
20842084
* @public
20852085
*/
2086-
export type RuleStringToEvaluate = RuleStringToEvaluate.AttributeMember | RuleStringToEvaluate.$UnknownMember;
2086+
export type RuleStringToEvaluate =
2087+
| RuleStringToEvaluate.AttributeMember
2088+
| RuleStringToEvaluate.MimeHeaderAttributeMember
2089+
| RuleStringToEvaluate.$UnknownMember;
20872090

20882091
/**
20892092
* @public
@@ -2095,6 +2098,17 @@ export namespace RuleStringToEvaluate {
20952098
*/
20962099
export interface AttributeMember {
20972100
Attribute: RuleStringEmailAttribute;
2101+
MimeHeaderAttribute?: never;
2102+
$unknown?: never;
2103+
}
2104+
2105+
/**
2106+
* <p>The email MIME X-Header attribute to evaluate in a string condition expression.</p>
2107+
* @public
2108+
*/
2109+
export interface MimeHeaderAttributeMember {
2110+
Attribute?: never;
2111+
MimeHeaderAttribute: string;
20982112
$unknown?: never;
20992113
}
21002114

@@ -2103,16 +2117,19 @@ export namespace RuleStringToEvaluate {
21032117
*/
21042118
export interface $UnknownMember {
21052119
Attribute?: never;
2120+
MimeHeaderAttribute?: never;
21062121
$unknown: [string, any];
21072122
}
21082123

21092124
export interface Visitor<T> {
21102125
Attribute: (value: RuleStringEmailAttribute) => T;
2126+
MimeHeaderAttribute: (value: string) => T;
21112127
_: (name: string, value: any) => T;
21122128
}
21132129

21142130
export const visit = <T>(value: RuleStringToEvaluate, visitor: Visitor<T>): T => {
21152131
if (value.Attribute !== undefined) return visitor.Attribute(value.Attribute);
2132+
if (value.MimeHeaderAttribute !== undefined) return visitor.MimeHeaderAttribute(value.MimeHeaderAttribute);
21162133
return visitor._(value.$unknown[0], value.$unknown[1]);
21172134
};
21182135
}

codegen/sdk-codegen/aws-models/mailmanager.json

+24-3
Original file line numberDiff line numberDiff line change
@@ -4410,7 +4410,7 @@
44104410
},
44114411
"aws.protocols#awsJson1_0": {},
44124412
"smithy.api#cors": {},
4413-
"smithy.api#documentation": "<fullname>AWS SES Mail Manager API</fullname>\n <p>\n <a href=\"http://aws.amazon.com/ses\">AWS SES Mail Manager API</a> contains operations and data types\n that comprise the Mail Manager feature of Amazon Simple Email Service.</p>\n <p>Mail Manager is a set of Amazon SES email gateway features designed to help you strengthen\n your organization's email infrastructure, simplify email workflow management, and\n streamline email compliance control. To learn more, see the <a href=\"https://docs.aws.amazon.com/ses/latest/dg/eb.html\">Mail Manager chapter</a> in the Amazon SES Developer\n Guide.</p>",
4413+
"smithy.api#documentation": "<fullname>Amazon SES Mail Manager API</fullname>\n <p>The Amazon SES Mail Manager API contains operations and data types\n that comprise the Mail Manager feature of <a href=\"http://aws.amazon.com/ses\">Amazon Simple Email Service (SES)</a>.</p>\n <p>Mail Manager is a set of Amazon SES email gateway features designed to help you strengthen\n your organization's email infrastructure, simplify email workflow management, and\n streamline email compliance control. To learn more, see the <a href=\"https://docs.aws.amazon.com/ses/latest/dg/eb.html\">Mail Manager chapter</a> in the <i>Amazon SES Developer\n Guide</i>.</p>",
44144414
"smithy.api#externalDocumentation": {
44154415
"API Reference": "https://w.amazon.com/bin/view/AWS/Border"
44164416
},
@@ -5115,6 +5115,12 @@
51155115
"smithy.api#documentation": "<p>The textual body content of an email message.</p>"
51165116
}
51175117
},
5118+
"com.amazonaws.mailmanager#MimeHeaderAttribute": {
5119+
"type": "string",
5120+
"traits": {
5121+
"smithy.api#pattern": "^X-[a-zA-Z0-9-]{1,256}$"
5122+
}
5123+
},
51185124
"com.amazonaws.mailmanager#NameOrArn": {
51195125
"type": "string",
51205126
"traits": {
@@ -6395,6 +6401,12 @@
63956401
"traits": {
63966402
"smithy.api#documentation": "<p>The email attribute to evaluate in a string condition expression.</p>"
63976403
}
6404+
},
6405+
"MimeHeaderAttribute": {
6406+
"target": "com.amazonaws.mailmanager#MimeHeaderAttribute",
6407+
"traits": {
6408+
"smithy.api#documentation": "<p>The email MIME X-Header attribute to evaluate in a string condition expression.</p>"
6409+
}
63986410
}
63996411
},
64006412
"traits": {
@@ -7078,10 +7090,19 @@
70787090
"target": "smithy.api#String"
70797091
}
70807092
},
7093+
"com.amazonaws.mailmanager#StringValue": {
7094+
"type": "string",
7095+
"traits": {
7096+
"smithy.api#length": {
7097+
"min": 1,
7098+
"max": 2048
7099+
}
7100+
}
7101+
},
70817102
"com.amazonaws.mailmanager#StringValueList": {
70827103
"type": "list",
70837104
"member": {
7084-
"target": "smithy.api#String"
7105+
"target": "com.amazonaws.mailmanager#StringValue"
70857106
},
70867107
"traits": {
70877108
"smithy.api#length": {
@@ -7653,7 +7674,7 @@
76537674
}
76547675
],
76557676
"traits": {
7656-
"smithy.api#documentation": "<p>&gt;Update attributes of an already provisioned rule set.</p>",
7677+
"smithy.api#documentation": "<p>Update attributes of an already provisioned rule set.</p>",
76577678
"smithy.api#idempotent": {}
76587679
}
76597680
},

0 commit comments

Comments
 (0)