Skip to content

Commit 9dba411

Browse files
author
AWS
committed
Amazon Elastic Container Registry Public Update: Add support for Dualstack endpoints
1 parent beef623 commit 9dba411

File tree

4 files changed

+78
-500
lines changed

4 files changed

+78
-500
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 Elastic Container Registry Public",
4+
"contributor": "",
5+
"description": "Add support for Dualstack endpoints"
6+
}

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

Lines changed: 44 additions & 231 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,19 @@
77
"documentation": "The AWS region used to dispatch the request.",
88
"type": "String"
99
},
10-
"UseDualStack": {
11-
"builtIn": "AWS::UseDualStack",
12-
"required": true,
13-
"default": false,
14-
"documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.",
15-
"type": "Boolean"
16-
},
1710
"UseFIPS": {
1811
"builtIn": "AWS::UseFIPS",
1912
"required": true,
2013
"default": false,
2114
"documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.",
2215
"type": "Boolean"
2316
},
24-
"Endpoint": {
25-
"builtIn": "SDK::Endpoint",
26-
"required": false,
27-
"documentation": "Override the endpoint used to send this request",
28-
"type": "String"
17+
"UseDualStack": {
18+
"builtIn": "AWS::UseDualStack",
19+
"required": true,
20+
"default": false,
21+
"documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.",
22+
"type": "Boolean"
2923
}
3024
},
3125
"rules": [
@@ -35,12 +29,20 @@
3529
"fn": "isSet",
3630
"argv": [
3731
{
38-
"ref": "Endpoint"
32+
"ref": "Region"
3933
}
4034
]
35+
},
36+
{
37+
"fn": "aws.partition",
38+
"argv": [
39+
{
40+
"ref": "Region"
41+
}
42+
],
43+
"assign": "PartitionResult"
4144
}
4245
],
43-
"type": "tree",
4446
"rules": [
4547
{
4648
"conditions": [
@@ -54,7 +56,7 @@
5456
]
5557
}
5658
],
57-
"error": "Invalid Configuration: FIPS and custom endpoint are not supported",
59+
"error": "ECR Public does not support FIPS",
5860
"type": "error"
5961
},
6062
{
@@ -69,246 +71,57 @@
6971
]
7072
}
7173
],
72-
"error": "Invalid Configuration: Dualstack and custom endpoint are not supported",
73-
"type": "error"
74-
},
75-
{
76-
"conditions": [],
77-
"endpoint": {
78-
"url": {
79-
"ref": "Endpoint"
80-
},
81-
"properties": {},
82-
"headers": {}
83-
},
84-
"type": "endpoint"
85-
}
86-
]
87-
},
88-
{
89-
"conditions": [
90-
{
91-
"fn": "isSet",
92-
"argv": [
93-
{
94-
"ref": "Region"
95-
}
96-
]
97-
}
98-
],
99-
"type": "tree",
100-
"rules": [
101-
{
102-
"conditions": [
103-
{
104-
"fn": "aws.partition",
105-
"argv": [
106-
{
107-
"ref": "Region"
108-
}
109-
],
110-
"assign": "PartitionResult"
111-
}
112-
],
113-
"type": "tree",
11474
"rules": [
11575
{
11676
"conditions": [
11777
{
11878
"fn": "booleanEquals",
11979
"argv": [
80+
true,
12081
{
121-
"ref": "UseFIPS"
122-
},
123-
true
124-
]
125-
},
126-
{
127-
"fn": "booleanEquals",
128-
"argv": [
129-
{
130-
"ref": "UseDualStack"
131-
},
132-
true
133-
]
134-
}
135-
],
136-
"type": "tree",
137-
"rules": [
138-
{
139-
"conditions": [
140-
{
141-
"fn": "booleanEquals",
82+
"fn": "getAttr",
14283
"argv": [
143-
true,
14484
{
145-
"fn": "getAttr",
146-
"argv": [
147-
{
148-
"ref": "PartitionResult"
149-
},
150-
"supportsFIPS"
151-
]
152-
}
153-
]
154-
},
155-
{
156-
"fn": "booleanEquals",
157-
"argv": [
158-
true,
159-
{
160-
"fn": "getAttr",
161-
"argv": [
162-
{
163-
"ref": "PartitionResult"
164-
},
165-
"supportsDualStack"
166-
]
167-
}
85+
"ref": "PartitionResult"
86+
},
87+
"supportsDualStack"
16888
]
16989
}
170-
],
171-
"type": "tree",
172-
"rules": [
173-
{
174-
"conditions": [],
175-
"endpoint": {
176-
"url": "https://api.ecr-public-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
177-
"properties": {},
178-
"headers": {}
179-
},
180-
"type": "endpoint"
181-
}
182-
]
183-
},
184-
{
185-
"conditions": [],
186-
"error": "FIPS and DualStack are enabled, but this partition does not support one or both",
187-
"type": "error"
188-
}
189-
]
190-
},
191-
{
192-
"conditions": [
193-
{
194-
"fn": "booleanEquals",
195-
"argv": [
196-
{
197-
"ref": "UseFIPS"
198-
},
199-
true
20090
]
20191
}
20292
],
203-
"type": "tree",
20493
"rules": [
205-
{
206-
"conditions": [
207-
{
208-
"fn": "booleanEquals",
209-
"argv": [
210-
true,
211-
{
212-
"fn": "getAttr",
213-
"argv": [
214-
{
215-
"ref": "PartitionResult"
216-
},
217-
"supportsFIPS"
218-
]
219-
}
220-
]
221-
}
222-
],
223-
"type": "tree",
224-
"rules": [
225-
{
226-
"conditions": [],
227-
"endpoint": {
228-
"url": "https://api.ecr-public-fips.{Region}.{PartitionResult#dnsSuffix}",
229-
"properties": {},
230-
"headers": {}
231-
},
232-
"type": "endpoint"
233-
}
234-
]
235-
},
23694
{
23795
"conditions": [],
238-
"error": "FIPS is enabled but this partition does not support FIPS",
239-
"type": "error"
240-
}
241-
]
242-
},
243-
{
244-
"conditions": [
245-
{
246-
"fn": "booleanEquals",
247-
"argv": [
248-
{
249-
"ref": "UseDualStack"
250-
},
251-
true
252-
]
96+
"endpoint": {
97+
"url": "https://ecr-public.{Region}.{PartitionResult#dualStackDnsSuffix}",
98+
"properties": {},
99+
"headers": {}
100+
},
101+
"type": "endpoint"
253102
}
254103
],
255-
"type": "tree",
256-
"rules": [
257-
{
258-
"conditions": [
259-
{
260-
"fn": "booleanEquals",
261-
"argv": [
262-
true,
263-
{
264-
"fn": "getAttr",
265-
"argv": [
266-
{
267-
"ref": "PartitionResult"
268-
},
269-
"supportsDualStack"
270-
]
271-
}
272-
]
273-
}
274-
],
275-
"type": "tree",
276-
"rules": [
277-
{
278-
"conditions": [],
279-
"endpoint": {
280-
"url": "https://api.ecr-public.{Region}.{PartitionResult#dualStackDnsSuffix}",
281-
"properties": {},
282-
"headers": {}
283-
},
284-
"type": "endpoint"
285-
}
286-
]
287-
},
288-
{
289-
"conditions": [],
290-
"error": "DualStack is enabled but this partition does not support DualStack",
291-
"type": "error"
292-
}
293-
]
104+
"type": "tree"
294105
},
295106
{
296107
"conditions": [],
297-
"endpoint": {
298-
"url": "https://api.ecr-public.{Region}.{PartitionResult#dnsSuffix}",
299-
"properties": {},
300-
"headers": {}
301-
},
302-
"type": "endpoint"
108+
"error": "Dualstack is enabled but this partition does not support dualstack",
109+
"type": "error"
303110
}
304-
]
111+
],
112+
"type": "tree"
113+
},
114+
{
115+
"conditions": [],
116+
"endpoint": {
117+
"url": "https://api.ecr-public.{Region}.{PartitionResult#dnsSuffix}",
118+
"properties": {},
119+
"headers": {}
120+
},
121+
"type": "endpoint"
305122
}
306-
]
307-
},
308-
{
309-
"conditions": [],
310-
"error": "Invalid Configuration: Missing Region",
311-
"type": "error"
123+
],
124+
"type": "tree"
312125
}
313126
]
314127
}

0 commit comments

Comments
 (0)