Skip to content

Commit 4f52728

Browse files
author
AWS
committed
Amazon Simple Email Service Update: Introduces support for multi-region endpoint.
1 parent 8fdd5cc commit 4f52728

File tree

5 files changed

+681
-0
lines changed

5 files changed

+681
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon Simple Email Service",
4+
"contributor": "",
5+
"description": "Introduces support for multi-region endpoint."
6+
}

services/sesv2/src/main/resources/codegen-resources/endpoint-rule-set.json

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,199 @@
2626
"required": false,
2727
"documentation": "Override the endpoint used to send this request",
2828
"type": "String"
29+
},
30+
"EndpointId": {
31+
"required": false,
32+
"documentation": "Operation parameter for EndpointId",
33+
"type": "String"
2934
}
3035
},
3136
"rules": [
37+
{
38+
"conditions": [
39+
{
40+
"fn": "isSet",
41+
"argv": [
42+
{
43+
"ref": "EndpointId"
44+
}
45+
]
46+
},
47+
{
48+
"fn": "isSet",
49+
"argv": [
50+
{
51+
"ref": "Region"
52+
}
53+
]
54+
},
55+
{
56+
"fn": "aws.partition",
57+
"argv": [
58+
{
59+
"ref": "Region"
60+
}
61+
],
62+
"assign": "PartitionResult"
63+
}
64+
],
65+
"rules": [
66+
{
67+
"conditions": [
68+
{
69+
"fn": "isValidHostLabel",
70+
"argv": [
71+
{
72+
"ref": "EndpointId"
73+
},
74+
true
75+
]
76+
}
77+
],
78+
"rules": [
79+
{
80+
"conditions": [
81+
{
82+
"fn": "booleanEquals",
83+
"argv": [
84+
{
85+
"ref": "UseFIPS"
86+
},
87+
false
88+
]
89+
}
90+
],
91+
"rules": [
92+
{
93+
"conditions": [
94+
{
95+
"fn": "isSet",
96+
"argv": [
97+
{
98+
"ref": "Endpoint"
99+
}
100+
]
101+
}
102+
],
103+
"endpoint": {
104+
"url": {
105+
"ref": "Endpoint"
106+
},
107+
"properties": {
108+
"authSchemes": [
109+
{
110+
"name": "sigv4a",
111+
"signingName": "ses",
112+
"signingRegionSet": [
113+
"*"
114+
]
115+
}
116+
]
117+
},
118+
"headers": {}
119+
},
120+
"type": "endpoint"
121+
},
122+
{
123+
"conditions": [
124+
{
125+
"fn": "booleanEquals",
126+
"argv": [
127+
{
128+
"ref": "UseDualStack"
129+
},
130+
true
131+
]
132+
}
133+
],
134+
"rules": [
135+
{
136+
"conditions": [
137+
{
138+
"fn": "booleanEquals",
139+
"argv": [
140+
true,
141+
{
142+
"fn": "getAttr",
143+
"argv": [
144+
{
145+
"ref": "PartitionResult"
146+
},
147+
"supportsDualStack"
148+
]
149+
}
150+
]
151+
}
152+
],
153+
"rules": [
154+
{
155+
"conditions": [],
156+
"endpoint": {
157+
"url": "https://{EndpointId}.endpoints.email.{PartitionResult#dualStackDnsSuffix}",
158+
"properties": {
159+
"authSchemes": [
160+
{
161+
"name": "sigv4a",
162+
"signingName": "ses",
163+
"signingRegionSet": [
164+
"*"
165+
]
166+
}
167+
]
168+
},
169+
"headers": {}
170+
},
171+
"type": "endpoint"
172+
}
173+
],
174+
"type": "tree"
175+
},
176+
{
177+
"conditions": [],
178+
"error": "DualStack is enabled but this partition does not support DualStack",
179+
"type": "error"
180+
}
181+
],
182+
"type": "tree"
183+
},
184+
{
185+
"conditions": [],
186+
"endpoint": {
187+
"url": "https://{EndpointId}.endpoints.email.{PartitionResult#dnsSuffix}",
188+
"properties": {
189+
"authSchemes": [
190+
{
191+
"name": "sigv4a",
192+
"signingName": "ses",
193+
"signingRegionSet": [
194+
"*"
195+
]
196+
}
197+
]
198+
},
199+
"headers": {}
200+
},
201+
"type": "endpoint"
202+
}
203+
],
204+
"type": "tree"
205+
},
206+
{
207+
"conditions": [],
208+
"error": "Invalid Configuration: FIPS is not supported with multi-region endpoints",
209+
"type": "error"
210+
}
211+
],
212+
"type": "tree"
213+
},
214+
{
215+
"conditions": [],
216+
"error": "EndpointId must be a valid host label",
217+
"type": "error"
218+
}
219+
],
220+
"type": "tree"
221+
},
32222
{
33223
"conditions": [
34224
{

services/sesv2/src/main/resources/codegen-resources/endpoint-tests.json

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,163 @@
594594
"expect": {
595595
"error": "Invalid Configuration: Missing Region"
596596
}
597+
},
598+
{
599+
"documentation": "Valid EndpointId with dualstack and FIPS disabled. i.e, IPv4 Only stack with no FIPS",
600+
"expect": {
601+
"endpoint": {
602+
"properties": {
603+
"authSchemes": [
604+
{
605+
"signingName": "ses",
606+
"name": "sigv4a",
607+
"signingRegionSet": [
608+
"*"
609+
]
610+
}
611+
]
612+
},
613+
"url": "https://abc123.456def.endpoints.email.amazonaws.com"
614+
}
615+
},
616+
"params": {
617+
"EndpointId": "abc123.456def",
618+
"UseDualStack": false,
619+
"UseFIPS": false,
620+
"Region": "us-east-1"
621+
}
622+
},
623+
{
624+
"documentation": "Valid EndpointId with dualstack enabled",
625+
"expect": {
626+
"endpoint": {
627+
"properties": {
628+
"authSchemes": [
629+
{
630+
"signingName": "ses",
631+
"name": "sigv4a",
632+
"signingRegionSet": [
633+
"*"
634+
]
635+
}
636+
]
637+
},
638+
"url": "https://abc123.456def.endpoints.email.api.aws"
639+
}
640+
},
641+
"params": {
642+
"EndpointId": "abc123.456def",
643+
"UseDualStack": true,
644+
"UseFIPS": false,
645+
"Region": "us-west-2"
646+
}
647+
},
648+
{
649+
"documentation": "Valid EndpointId with FIPS set, dualstack disabled",
650+
"expect": {
651+
"error": "Invalid Configuration: FIPS is not supported with multi-region endpoints"
652+
},
653+
"params": {
654+
"EndpointId": "abc123.456def",
655+
"UseDualStack": false,
656+
"UseFIPS": true,
657+
"Region": "ap-northeast-1"
658+
}
659+
},
660+
{
661+
"documentation": "Valid EndpointId with both dualstack and FIPS enabled",
662+
"expect": {
663+
"error": "Invalid Configuration: FIPS is not supported with multi-region endpoints"
664+
},
665+
"params": {
666+
"EndpointId": "abc123.456def",
667+
"UseDualStack": true,
668+
"UseFIPS": true,
669+
"Region": "ap-northeast-2"
670+
}
671+
},
672+
{
673+
"documentation": "Regular regional request, without EndpointId",
674+
"expect": {
675+
"endpoint": {
676+
"url": "https://email.eu-west-1.amazonaws.com"
677+
}
678+
},
679+
"params": {
680+
"UseDualStack": false,
681+
"Region": "eu-west-1"
682+
}
683+
},
684+
{
685+
"documentation": "Invalid EndpointId (Invalid chars / format)",
686+
"expect": {
687+
"error": "EndpointId must be a valid host label"
688+
},
689+
"params": {
690+
"EndpointId": "badactor.com?foo=bar",
691+
"UseDualStack": false,
692+
"Region": "eu-west-2"
693+
}
694+
},
695+
{
696+
"documentation": "Invalid EndpointId (Empty)",
697+
"expect": {
698+
"error": "EndpointId must be a valid host label"
699+
},
700+
"params": {
701+
"EndpointId": "",
702+
"UseDualStack": false,
703+
"Region": "ap-south-1"
704+
}
705+
},
706+
{
707+
"documentation": "Valid EndpointId with custom sdk endpoint",
708+
"expect": {
709+
"endpoint": {
710+
"properties": {
711+
"authSchemes": [
712+
{
713+
"signingName": "ses",
714+
"name": "sigv4a",
715+
"signingRegionSet": [
716+
"*"
717+
]
718+
}
719+
]
720+
},
721+
"url": "https://example.com"
722+
}
723+
},
724+
"params": {
725+
"EndpointId": "abc123.456def",
726+
"UseDualStack": false,
727+
"Region": "us-east-1",
728+
"Endpoint": "https://example.com"
729+
}
730+
},
731+
{
732+
"documentation": "Valid EndpointId with custom sdk endpoint with FIPS enabled",
733+
"expect": {
734+
"error": "Invalid Configuration: FIPS is not supported with multi-region endpoints"
735+
},
736+
"params": {
737+
"EndpointId": "abc123.456def",
738+
"UseDualStack": false,
739+
"UseFIPS": true,
740+
"Region": "us-east-1",
741+
"Endpoint": "https://example.com"
742+
}
743+
},
744+
{
745+
"documentation": "Valid EndpointId with DualStack enabled and partition does not support DualStack",
746+
"expect": {
747+
"error": "DualStack is enabled but this partition does not support DualStack"
748+
},
749+
"params": {
750+
"EndpointId": "abc123.456def",
751+
"UseDualStack": true,
752+
"Region": "us-isob-east-1"
753+
}
597754
}
598755
],
599756
"version": "1.0"

services/sesv2/src/main/resources/codegen-resources/paginators-1.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@
6060
"output_token": "NextToken",
6161
"limit_key": "PageSize"
6262
},
63+
"ListMultiRegionEndpoints": {
64+
"input_token": "NextToken",
65+
"output_token": "NextToken",
66+
"limit_key": "PageSize",
67+
"result_key": "MultiRegionEndpoints"
68+
},
6369
"ListRecommendations": {
6470
"input_token": "NextToken",
6571
"output_token": "NextToken",

0 commit comments

Comments
 (0)