Skip to content

Commit ce892a7

Browse files
author
awstools
committed
feat(client-marketplace-entitlement-service): Add support for Marketplace Entitlement Service dual-stack endpoints.
1 parent fc7f772 commit ce892a7

File tree

3 files changed

+399
-264
lines changed

3 files changed

+399
-264
lines changed

Diff for: clients/client-marketplace-entitlement-service/src/endpoint/EndpointParameters.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provi
55
* @public
66
*/
77
export interface ClientInputEndpointParameters {
8-
region?: string | Provider<string>;
98
useDualstackEndpoint?: boolean | Provider<boolean>;
109
useFipsEndpoint?: boolean | Provider<boolean>;
1110
endpoint?: string | Provider<string> | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>;
11+
region?: string | Provider<string>;
1212
}
1313

1414
export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & {
@@ -33,8 +33,8 @@ export const commonParams = {
3333
} as const;
3434

3535
export interface EndpointParameters extends __EndpointParameters {
36-
Region?: string;
3736
UseDualStack?: boolean;
3837
UseFIPS?: boolean;
3938
Endpoint?: string;
39+
Region?: string;
4040
}

Diff for: clients/client-marketplace-entitlement-service/src/endpoint/ruleset.ts

+18-20
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,29 @@ import { RuleSetObject } from "@smithy/types";
66
or see "smithy.rules#endpointRuleSet"
77
in codegen/sdk-codegen/aws-models/marketplace-entitlement-service.json */
88

9-
const w="required",
10-
x="fn",
11-
y="argv",
12-
z="ref";
9+
const u="required",
10+
v="fn",
11+
w="argv",
12+
x="ref";
1313
const a=true,
1414
b="isSet",
1515
c="booleanEquals",
1616
d="error",
1717
e="endpoint",
1818
f="tree",
1919
g="PartitionResult",
20-
h="getAttr",
21-
i="stringEquals",
22-
j={[w]:false,"type":"String"},
23-
k={[w]:true,"default":false,"type":"Boolean"},
24-
l={[z]:"Endpoint"},
25-
m={[x]:c,[y]:[{[z]:"UseFIPS"},true]},
26-
n={[x]:c,[y]:[{[z]:"UseDualStack"},true]},
27-
o={},
28-
p={[z]:"Region"},
29-
q={[x]:h,[y]:[{[z]:g},"supportsFIPS"]},
30-
r={[z]:g},
31-
s={[x]:c,[y]:[true,{[x]:h,[y]:[r,"supportsDualStack"]}]},
32-
t=[m],
33-
u=[n],
34-
v=[p];
35-
const _data={version:"1.0",parameters:{Region:j,UseDualStack:k,UseFIPS:k,Endpoint:j},rules:[{conditions:[{[x]:b,[y]:[l]}],rules:[{conditions:t,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:u,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:l,properties:o,headers:o},type:e}],type:f},{conditions:[{[x]:b,[y]:v}],rules:[{conditions:[{[x]:"aws.partition",[y]:v,assign:g}],rules:[{conditions:[m,n],rules:[{conditions:[{[x]:c,[y]:[a,q]},s],rules:[{endpoint:{url:"https://entitlement.marketplace-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:o,headers:o},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:t,rules:[{conditions:[{[x]:c,[y]:[q,a]}],rules:[{endpoint:{url:"https://entitlement.marketplace-fips.{Region}.{PartitionResult#dnsSuffix}",properties:o,headers:o},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:u,rules:[{conditions:[s],rules:[{endpoint:{url:"https://entitlement.marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:o,headers:o},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{conditions:[{[x]:i,[y]:[p,"cn-northwest-1"]}],endpoint:{url:"https://entitlement-marketplace.cn-northwest-1.amazonaws.com.cn",properties:o,headers:o},type:e},{conditions:[{[x]:i,[y]:["aws",{[x]:h,[y]:[r,"name"]}]}],endpoint:{url:"https://entitlement.marketplace.{Region}.amazonaws.com",properties:o,headers:o},type:e},{endpoint:{url:"https://entitlement.marketplace.{Region}.{PartitionResult#dnsSuffix}",properties:o,headers:o},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]};
20+
h="stringEquals",
21+
i={[u]:true,"default":false,"type":"Boolean"},
22+
j={[u]:false,"type":"String"},
23+
k={[x]:"Endpoint"},
24+
l={[v]:c,[w]:[{[x]:"UseFIPS"},true]},
25+
m={[v]:c,[w]:[{[x]:"UseDualStack"},true]},
26+
n={},
27+
o={[v]:"getAttr",[w]:[{[x]:g},"name"]},
28+
p={[v]:c,[w]:[{[x]:"UseFIPS"},false]},
29+
q={[v]:c,[w]:[{[x]:"UseDualStack"},false]},
30+
r={[v]:"getAttr",[w]:[{[x]:g},"supportsFIPS"]},
31+
s={[v]:c,[w]:[true,{[v]:"getAttr",[w]:[{[x]:g},"supportsDualStack"]}]},
32+
t=[{[x]:"Region"}];
33+
const _data={version:"1.0",parameters:{UseDualStack:i,UseFIPS:i,Endpoint:j,Region:j},rules:[{conditions:[{[v]:b,[w]:[k]}],rules:[{conditions:[l],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{rules:[{conditions:[m],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:k,properties:n,headers:n},type:e}],type:f}],type:f},{rules:[{conditions:[{[v]:b,[w]:t}],rules:[{conditions:[{[v]:"aws.partition",[w]:t,assign:g}],rules:[{conditions:[{[v]:h,[w]:[o,"aws"]},p,m],endpoint:{url:"https://entitlement-marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:e},{conditions:[{[v]:h,[w]:[o,"aws-cn"]},p,q],endpoint:{url:"https://entitlement-marketplace.{Region}.amazonaws.com.cn",properties:n,headers:n},type:e},{conditions:[l,m],rules:[{conditions:[{[v]:c,[w]:[a,r]},s],rules:[{endpoint:{url:"https://entitlement.marketplace-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:[l,q],rules:[{conditions:[{[v]:c,[w]:[r,a]}],rules:[{endpoint:{url:"https://entitlement.marketplace-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:[p,m],rules:[{conditions:[s],rules:[{endpoint:{url:"https://entitlement.marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://entitlement.marketplace.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}],type:f}]};
3634
export const ruleSet: RuleSetObject = _data;

0 commit comments

Comments
 (0)