Skip to content

Commit a5f3e86

Browse files
author
AWS
committed
AWSMarketplace Metering Update: Add support for Marketplace Metering Service dual-stack endpoints for CN regions
1 parent 7d59434 commit a5f3e86

File tree

3 files changed

+94
-2
lines changed

3 files changed

+94
-2
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": "AWSMarketplace Metering",
4+
"contributor": "",
5+
"description": "Add support for Marketplace Metering Service dual-stack endpoints for CN regions"
6+
}

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

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,92 @@
162162
},
163163
"type": "endpoint"
164164
},
165+
{
166+
"conditions": [
167+
{
168+
"fn": "stringEquals",
169+
"argv": [
170+
{
171+
"fn": "getAttr",
172+
"argv": [
173+
{
174+
"ref": "PartitionResult"
175+
},
176+
"name"
177+
]
178+
},
179+
"aws-cn"
180+
]
181+
},
182+
{
183+
"fn": "booleanEquals",
184+
"argv": [
185+
{
186+
"ref": "UseFIPS"
187+
},
188+
false
189+
]
190+
},
191+
{
192+
"fn": "booleanEquals",
193+
"argv": [
194+
{
195+
"ref": "UseDualStack"
196+
},
197+
true
198+
]
199+
}
200+
],
201+
"endpoint": {
202+
"url": "https://metering-marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}",
203+
"properties": {},
204+
"headers": {}
205+
},
206+
"type": "endpoint"
207+
},
208+
{
209+
"conditions": [
210+
{
211+
"fn": "stringEquals",
212+
"argv": [
213+
{
214+
"fn": "getAttr",
215+
"argv": [
216+
{
217+
"ref": "PartitionResult"
218+
},
219+
"name"
220+
]
221+
},
222+
"aws-us-gov"
223+
]
224+
},
225+
{
226+
"fn": "booleanEquals",
227+
"argv": [
228+
{
229+
"ref": "UseFIPS"
230+
},
231+
false
232+
]
233+
},
234+
{
235+
"fn": "booleanEquals",
236+
"argv": [
237+
{
238+
"ref": "UseDualStack"
239+
},
240+
true
241+
]
242+
}
243+
],
244+
"endpoint": {
245+
"url": "https://metering-marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}",
246+
"properties": {},
247+
"headers": {}
248+
},
249+
"type": "endpoint"
250+
},
165251
{
166252
"conditions": [
167253
{

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
"documentation": "For region cn-northwest-1 with FIPS disabled and DualStack enabled",
116116
"expect": {
117117
"endpoint": {
118-
"url": "https://metering.marketplace.cn-northwest-1.api.amazonwebservices.com.cn"
118+
"url": "https://metering-marketplace.cn-northwest-1.api.amazonwebservices.com.cn"
119119
}
120120
},
121121
"params": {
@@ -167,7 +167,7 @@
167167
"documentation": "For region us-gov-west-1 with FIPS disabled and DualStack enabled",
168168
"expect": {
169169
"endpoint": {
170-
"url": "https://metering.marketplace.us-gov-west-1.api.aws"
170+
"url": "https://metering-marketplace.us-gov-west-1.api.aws"
171171
}
172172
},
173173
"params": {

0 commit comments

Comments
 (0)