Skip to content

Commit

Permalink
feat(client-internetmonitor): This release updates the Amazon CloudWa…
Browse files Browse the repository at this point in the history
…tch Internet Monitor API domain name.
  • Loading branch information
awstools committed Sep 13, 2023
1 parent a721414 commit 5f45618
Show file tree
Hide file tree
Showing 13 changed files with 357 additions and 99 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export class CreateMonitorCommand extends $Command<
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export class DeleteMonitorCommand extends $Command<
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export class GetHealthEventCommand extends $Command<
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export class GetMonitorCommand extends $Command<
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export class ListHealthEventsCommand extends $Command<
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export class ListMonitorsCommand extends $Command<
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export class ListTagsForResourceCommand extends $Command<
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export class TagResourceCommand extends $Command<
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export class UntagResourceCommand extends $Command<
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export class UpdateMonitorCommand extends $Command<
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provi
*/
export interface ClientInputEndpointParameters {
region?: string | Provider<string>;
useDualstackEndpoint?: boolean | Provider<boolean>;
useFipsEndpoint?: boolean | Provider<boolean>;
endpoint?: string | Provider<string> | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>;
}
Expand All @@ -19,13 +20,15 @@ export const resolveClientEndpointParameters = <T>(
): T & ClientResolvedEndpointParameters => {
return {
...options,
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
useFipsEndpoint: options.useFipsEndpoint ?? false,
defaultSigningName: "internetmonitor",
};
};

export interface EndpointParameters extends __EndpointParameters {
Region?: string;
UseDualStack?: boolean;
UseFIPS?: boolean;
Endpoint?: string;
}
41 changes: 21 additions & 20 deletions clients/client-internetmonitor/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,25 @@ import { RuleSetObject } from "@smithy/types";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/internetmonitor.json */

const r="argv",
s="ref";
const a=false,
b=true,
c="isSet",
d="tree",
e="booleanEquals",
f="error",
g="endpoint",
h="PartitionResult",
i="getAttr",
j={"required":false,"type":"String"},
k={[s]:"Endpoint"},
l={},
m={[s]:h},
n={[f]:"FIPS is enabled but this partition does not support FIPS","type":f},
o=[{"fn":e,[r]:[{[s]:"UseFIPS"},true]}],
p=[{[s]:"Region"}],
q=[{"fn":e,[r]:[true,{"fn":i,[r]:[m,"supportsFIPS"]}]}];
const _data={version:"1.0",parameters:{Region:j,UseFIPS:{required:b,default:a,type:"Boolean"},Endpoint:j},rules:[{conditions:[{fn:c,[r]:[k]}],type:d,rules:[{conditions:o,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{endpoint:{url:k,properties:l,headers:l},type:g}]},{conditions:[{fn:c,[r]:p}],type:d,rules:[{conditions:[{fn:"aws.partition",[r]:p,assign:h}],type:d,rules:[{conditions:[{fn:e,[r]:[b,{fn:i,[r]:[m,"supportsDualStack"]}]}],type:d,rules:[{conditions:o,type:d,rules:[{conditions:q,type:d,rules:[{endpoint:{url:"https://internetmonitor-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]},n]},{endpoint:{url:"https://internetmonitor.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]},{conditions:o,type:d,rules:[{conditions:q,type:d,rules:[{endpoint:{url:"https://internetmonitor-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]},n]},{endpoint:{url:"https://internetmonitor.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"Invalid Configuration: Missing Region",type:f}]};
const q="required",
r="fn",
s="argv",
t="ref";
const a="isSet",
b="tree",
c="error",
d="endpoint",
e="PartitionResult",
f={[q]:false,"type":"String"},
g={[q]:true,"default":false,"type":"Boolean"},
h={[t]:"Endpoint"},
i={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]},
j={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]},
k={},
l={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsFIPS"]}]},
m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"]}]},
n=[i],
o=[j],
p=[{[t]:"Region"}];
const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]},{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{endpoint:{url:"https://internetmonitor-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{endpoint:{url:"https://internetmonitor-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{endpoint:{url:"https://internetmonitor.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://internetmonitor.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]};
export const ruleSet: RuleSetObject = _data;
Loading

0 comments on commit 5f45618

Please sign in to comment.