From 5f45618a5be74b3098439c78bdb144f4d72bc7dd Mon Sep 17 00:00:00 2001 From: awstools Date: Wed, 13 Sep 2023 18:15:02 +0000 Subject: [PATCH] feat(client-internetmonitor): This release updates the Amazon CloudWatch Internet Monitor API domain name. --- .../src/commands/CreateMonitorCommand.ts | 1 + .../src/commands/DeleteMonitorCommand.ts | 1 + .../src/commands/GetHealthEventCommand.ts | 1 + .../src/commands/GetMonitorCommand.ts | 1 + .../src/commands/ListHealthEventsCommand.ts | 1 + .../src/commands/ListMonitorsCommand.ts | 1 + .../commands/ListTagsForResourceCommand.ts | 1 + .../src/commands/TagResourceCommand.ts | 1 + .../src/commands/UntagResourceCommand.ts | 1 + .../src/commands/UpdateMonitorCommand.ts | 1 + .../src/endpoint/EndpointParameters.ts | 3 + .../src/endpoint/ruleset.ts | 41 +- .../aws-models/internetmonitor.json | 402 ++++++++++++++---- 13 files changed, 357 insertions(+), 99 deletions(-) diff --git a/clients/client-internetmonitor/src/commands/CreateMonitorCommand.ts b/clients/client-internetmonitor/src/commands/CreateMonitorCommand.ts index 4056325c00b97..c45d69db0b466 100644 --- a/clients/client-internetmonitor/src/commands/CreateMonitorCommand.ts +++ b/clients/client-internetmonitor/src/commands/CreateMonitorCommand.ts @@ -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" }, }; } diff --git a/clients/client-internetmonitor/src/commands/DeleteMonitorCommand.ts b/clients/client-internetmonitor/src/commands/DeleteMonitorCommand.ts index 5149cb8d8ebfc..1ec77128b7cab 100644 --- a/clients/client-internetmonitor/src/commands/DeleteMonitorCommand.ts +++ b/clients/client-internetmonitor/src/commands/DeleteMonitorCommand.ts @@ -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" }, }; } diff --git a/clients/client-internetmonitor/src/commands/GetHealthEventCommand.ts b/clients/client-internetmonitor/src/commands/GetHealthEventCommand.ts index b06fb5dcb6567..6ebbd0fa48dcd 100644 --- a/clients/client-internetmonitor/src/commands/GetHealthEventCommand.ts +++ b/clients/client-internetmonitor/src/commands/GetHealthEventCommand.ts @@ -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" }, }; } diff --git a/clients/client-internetmonitor/src/commands/GetMonitorCommand.ts b/clients/client-internetmonitor/src/commands/GetMonitorCommand.ts index ca9ab6d05537f..208f3d9657b9a 100644 --- a/clients/client-internetmonitor/src/commands/GetMonitorCommand.ts +++ b/clients/client-internetmonitor/src/commands/GetMonitorCommand.ts @@ -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" }, }; } diff --git a/clients/client-internetmonitor/src/commands/ListHealthEventsCommand.ts b/clients/client-internetmonitor/src/commands/ListHealthEventsCommand.ts index f880c6e4271d6..32e1348121c09 100644 --- a/clients/client-internetmonitor/src/commands/ListHealthEventsCommand.ts +++ b/clients/client-internetmonitor/src/commands/ListHealthEventsCommand.ts @@ -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" }, }; } diff --git a/clients/client-internetmonitor/src/commands/ListMonitorsCommand.ts b/clients/client-internetmonitor/src/commands/ListMonitorsCommand.ts index f651eb79bdbee..8c456ee532c6b 100644 --- a/clients/client-internetmonitor/src/commands/ListMonitorsCommand.ts +++ b/clients/client-internetmonitor/src/commands/ListMonitorsCommand.ts @@ -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" }, }; } diff --git a/clients/client-internetmonitor/src/commands/ListTagsForResourceCommand.ts b/clients/client-internetmonitor/src/commands/ListTagsForResourceCommand.ts index 9b7c0567b0af1..4a35e169d839b 100644 --- a/clients/client-internetmonitor/src/commands/ListTagsForResourceCommand.ts +++ b/clients/client-internetmonitor/src/commands/ListTagsForResourceCommand.ts @@ -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" }, }; } diff --git a/clients/client-internetmonitor/src/commands/TagResourceCommand.ts b/clients/client-internetmonitor/src/commands/TagResourceCommand.ts index f3d1cfe3efecd..2326effd83a0c 100644 --- a/clients/client-internetmonitor/src/commands/TagResourceCommand.ts +++ b/clients/client-internetmonitor/src/commands/TagResourceCommand.ts @@ -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" }, }; } diff --git a/clients/client-internetmonitor/src/commands/UntagResourceCommand.ts b/clients/client-internetmonitor/src/commands/UntagResourceCommand.ts index 404c63b273dd4..5c3cb9023aa33 100644 --- a/clients/client-internetmonitor/src/commands/UntagResourceCommand.ts +++ b/clients/client-internetmonitor/src/commands/UntagResourceCommand.ts @@ -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" }, }; } diff --git a/clients/client-internetmonitor/src/commands/UpdateMonitorCommand.ts b/clients/client-internetmonitor/src/commands/UpdateMonitorCommand.ts index ded636fc20e51..4ea184bdcf100 100644 --- a/clients/client-internetmonitor/src/commands/UpdateMonitorCommand.ts +++ b/clients/client-internetmonitor/src/commands/UpdateMonitorCommand.ts @@ -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" }, }; } diff --git a/clients/client-internetmonitor/src/endpoint/EndpointParameters.ts b/clients/client-internetmonitor/src/endpoint/EndpointParameters.ts index 46f9d38c2dece..1018003ebfcd4 100644 --- a/clients/client-internetmonitor/src/endpoint/EndpointParameters.ts +++ b/clients/client-internetmonitor/src/endpoint/EndpointParameters.ts @@ -6,6 +6,7 @@ import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provi */ export interface ClientInputEndpointParameters { region?: string | Provider; + useDualstackEndpoint?: boolean | Provider; useFipsEndpoint?: boolean | Provider; endpoint?: string | Provider | Endpoint | Provider | EndpointV2 | Provider; } @@ -19,6 +20,7 @@ export const resolveClientEndpointParameters = ( ): T & ClientResolvedEndpointParameters => { return { ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, useFipsEndpoint: options.useFipsEndpoint ?? false, defaultSigningName: "internetmonitor", }; @@ -26,6 +28,7 @@ export const resolveClientEndpointParameters = ( export interface EndpointParameters extends __EndpointParameters { Region?: string; + UseDualStack?: boolean; UseFIPS?: boolean; Endpoint?: string; } diff --git a/clients/client-internetmonitor/src/endpoint/ruleset.ts b/clients/client-internetmonitor/src/endpoint/ruleset.ts index 645f217256a54..ddbe1eb212b4f 100644 --- a/clients/client-internetmonitor/src/endpoint/ruleset.ts +++ b/clients/client-internetmonitor/src/endpoint/ruleset.ts @@ -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; diff --git a/codegen/sdk-codegen/aws-models/internetmonitor.json b/codegen/sdk-codegen/aws-models/internetmonitor.json index 41a0d1a3fd76c..8d76d547f2d08 100644 --- a/codegen/sdk-codegen/aws-models/internetmonitor.json +++ b/codegen/sdk-codegen/aws-models/internetmonitor.json @@ -105,10 +105,7 @@ } ], "traits": { - "aws.iam#conditionKeys": [ - "aws:RequestTag/${TagKey}", - "aws:TagKeys" - ], + "aws.iam#conditionKeys": ["aws:RequestTag/${TagKey}", "aws:TagKeys"], "smithy.api#documentation": "

Creates a monitor in Amazon CloudWatch Internet Monitor. A monitor is built based on information from the application resources that you add: VPCs,\n\t\t\tNetwork Load Balancers (NLBs), Amazon CloudFront distributions, and Amazon WorkSpaces directories. Internet Monitor then publishes internet measurements from Amazon Web Services \n\t\t\tthat are specific to the city-networks. That is, the locations and ASNs (typically internet service providers or ISPs),\n\t\t\twhere clients access your application. For more information, see Using Amazon CloudWatch Internet Monitor in the Amazon CloudWatch User \n\t\t\t\t\tGuide.

\n

When you create a monitor, you choose the percentage of traffic that you want to monitor. You can also set a maximum limit for the \n\t\t\tnumber of city-networks where client traffic is monitored, that caps the total traffic that Internet Monitor monitors. A city-network \n\t\t\tmaximum is the limit of city-networks, but you only pay for the number of city-networks that are actually monitored. You can update your monitor\n\t\t\tat any time to change the percentage of traffic to monitor or the city-networks maximum. For more information, see Choosing a city-network maximum value in the Amazon CloudWatch User Guide.

", "smithy.api#http": { "uri": "/v20210603/Monitors", @@ -920,18 +917,10 @@ "externalDocumentation": "${DocHomeURL}IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-tagkeys" } }, - "aws.iam#supportedPrincipalTypes": [ - "Root", - "IAMUser", - "IAMRole", - "FederatedUser" - ], + "aws.iam#supportedPrincipalTypes": ["Root", "IAMUser", "IAMRole", "FederatedUser"], "aws.protocols#restJson1": {}, "smithy.api#cors": { - "additionalAllowedHeaders": [ - "Content-Type", - "X-Amz-Requested-Operation" - ] + "additionalAllowedHeaders": ["Content-Type", "X-Amz-Requested-Operation"] }, "smithy.api#documentation": "

Amazon CloudWatch Internet Monitor provides visibility into how internet issues impact the performance and availability \n\t\t\tbetween your applications hosted on Amazon Web Services and your end users. It can reduce the time it takes for you to diagnose \n\t\t\tinternet issues from days to minutes. Internet Monitor uses the connectivity data that Amazon Web Services captures from its global \n\t\t\tnetworking footprint to calculate a baseline of performance and availability for internet traffic. This \n\t\t\tis the same data that Amazon Web Services uses to monitor internet uptime and availability. With those measurements \n\t\t\tas a baseline, Internet Monitor raises awareness for you when there are significant problems for your \n\t\t\tend users in the different geographic locations where your application runs.

\n

Internet Monitor publishes internet measurements to CloudWatch Logs and CloudWatch Metrics, \n\t\t\tto easily support using CloudWatch tools with health information for geographies and networks specific to your application.\n\t\t\tInternet Monitor sends health events to Amazon EventBridge so that you can set up notifications. If an issue is caused by the Amazon Web Services network, \n\t\t\tyou also automatically receive an Amazon Web Services Health Dashboard notification with the steps that Amazon Web Services is taking to mitigate the problem.

\n

To use Internet Monitor, you create a monitor and associate your application's resources \n\t\t\twith it - VPCs, NLBs, CloudFront distributions, or WorkSpaces directories - so Internet Monitor can determine \n\t\t\twhere your application's internet traffic is. Internet Monitor then provides internet measurements from Amazon Web Services that are specific to \n\t\t\tthe locations and ASNs (typically, internet service providers or ISPs) that communicate with your application.

\n

For more information, see Using Amazon CloudWatch Internet Monitor in the Amazon CloudWatch User Guide.

", "smithy.api#title": "Amazon CloudWatch Internet Monitor", @@ -944,6 +933,13 @@ "documentation": "The AWS region used to dispatch the request.", "type": "String" }, + "UseDualStack": { + "builtIn": "AWS::UseDualStack", + "required": true, + "default": false, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "Boolean" + }, "UseFIPS": { "builtIn": "AWS::UseFIPS", "required": true, @@ -987,6 +983,21 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported", "type": "error" }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, { "conditions": [], "endpoint": { @@ -1032,16 +1043,19 @@ { "fn": "booleanEquals", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true ] } ], @@ -1052,61 +1066,51 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] - } - ], - "type": "tree", - "rules": [ + }, { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://internetmonitor-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://internetmonitor-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { "conditions": [], - "endpoint": { - "url": "https://internetmonitor.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" } ] }, @@ -1162,6 +1166,58 @@ } ] }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://internetmonitor.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ] + }, { "conditions": [], "endpoint": { @@ -1193,7 +1249,21 @@ }, "params": { "Region": "us-east-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://internetmonitor-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1205,7 +1275,21 @@ }, "params": { "Region": "us-east-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://internetmonitor.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1217,7 +1301,21 @@ }, "params": { "Region": "cn-north-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://internetmonitor-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1229,7 +1327,21 @@ }, "params": { "Region": "cn-north-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://internetmonitor.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1241,7 +1353,21 @@ }, "params": { "Region": "us-gov-east-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://internetmonitor-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1253,7 +1379,117 @@ }, "params": { "Region": "us-gov-east-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://internetmonitor.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://internetmonitor-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://internetmonitor.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://internetmonitor-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://internetmonitor.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1266,6 +1502,7 @@ "params": { "Region": "us-east-1", "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1278,6 +1515,7 @@ }, "params": { "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1289,6 +1527,19 @@ "params": { "Region": "us-east-1", "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } }, @@ -1789,9 +2040,7 @@ "aws.cloudformation#cfnResource": { "name": "Monitor" }, - "aws.iam#conditionKeys": [ - "aws:ResourceTag/${TagKey}" - ], + "aws.iam#conditionKeys": ["aws:ResourceTag/${TagKey}"], "aws.iam#disableConditionKeyInference": {} } }, @@ -2053,10 +2302,7 @@ } ], "traits": { - "aws.iam#conditionKeys": [ - "aws:RequestTag/${TagKey}", - "aws:TagKeys" - ], + "aws.iam#conditionKeys": ["aws:RequestTag/${TagKey}", "aws:TagKeys"], "smithy.api#documentation": "

Adds a tag to a resource. Tags are supported only for monitors in Amazon CloudWatch Internet Monitor. You can add a maximum of 50 tags in Internet Monitor.

\n

A minimum of one tag is required for this call. It returns an error if you use the TagResource request with 0 tags.

", "smithy.api#http": { "method": "POST", @@ -2193,9 +2439,7 @@ } ], "traits": { - "aws.iam#conditionKeys": [ - "aws:TagKeys" - ], + "aws.iam#conditionKeys": ["aws:TagKeys"], "smithy.api#documentation": "

Removes a tag from a resource.

", "smithy.api#http": { "method": "DELETE", @@ -2375,4 +2619,4 @@ } } } -} \ No newline at end of file +}